mirror of https://github.com/swig/swig
Combine duplicate unordered_set unordered_map testcases
Merge cpp11_li_std_unordered_map into cpp11_std_unordered_map Merge cpp11_li_std_unordered_set into cpp11_std_unordered_set
This commit is contained in:
parent
9849174d93
commit
82d1632071
|
@ -1,11 +0,0 @@
|
|||
/*
|
||||
* A test of unordered_map containers.
|
||||
*/
|
||||
|
||||
%module cpp11_li_std_unordered_map
|
||||
|
||||
%include <std_string.i>
|
||||
%include <std_unordered_map.i>
|
||||
|
||||
%template(IntIntUnorderedMap) std::unordered_map<int, int>;
|
||||
%template(StringIntUnorderedMap) std::unordered_map<std::string, int>;
|
|
@ -1,10 +0,0 @@
|
|||
/*
|
||||
* A test of unordered_set containers.
|
||||
*/
|
||||
|
||||
%module cpp11_li_std_unordered_set
|
||||
|
||||
%include <std_string.i>
|
||||
%include <std_unordered_set.i>
|
||||
|
||||
%template(StringUnorderedSet) std::unordered_set<std::string>;
|
|
@ -1,5 +1,7 @@
|
|||
%module cpp11_std_unordered_map
|
||||
|
||||
%include <std_string.i>
|
||||
%include <std_unordered_map.i>
|
||||
|
||||
%template(UnorderedMapIntInt) std::unordered_map<int, int>;
|
||||
%template(UnorderedMapStringInt) std::unordered_map<std::string, int>;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
%module cpp11_std_unordered_set
|
||||
|
||||
%include <std_string.i>
|
||||
%include <std_unordered_set.i>
|
||||
|
||||
%template(UnorderedSetInt) std::unordered_set<int>;
|
||||
%template(UnorderedSetString) std::unordered_set<std::string>;
|
||||
|
|
|
@ -53,9 +53,9 @@ CPP11_TEST_CASES = \
|
|||
cpp11_shared_ptr_nullptr_in_containers \
|
||||
cpp11_shared_ptr_overload \
|
||||
cpp11_shared_ptr_upcast \
|
||||
cpp11_std_unordered_map \
|
||||
cpp11_std_unordered_set \
|
||||
cpp11_strongly_typed_enumerations_simple \
|
||||
cpp11_li_std_unordered_map \
|
||||
cpp11_li_std_unordered_set \
|
||||
|
||||
DOXYGEN_TEST_CASES := \
|
||||
doxygen_parsing_enums_simple \
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import cpp11_li_std_unordered_map.*;
|
||||
import cpp11_std_unordered_map.*;
|
||||
|
||||
public class cpp11_li_std_unordered_map_runme {
|
||||
public class cpp11_std_unordered_map_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("cpp11_li_std_unordered_map");
|
||||
System.loadLibrary("cpp11_std_unordered_map");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||
System.exit(1);
|
||||
|
@ -20,8 +20,8 @@ public class cpp11_li_std_unordered_map_runme {
|
|||
|
||||
public static void main(String argv[]) throws Throwable
|
||||
{
|
||||
java.util.AbstractMap<String, Integer> sim = new StringIntUnorderedMap();
|
||||
java.util.AbstractMap<Integer, Integer> iim = new IntIntUnorderedMap();
|
||||
java.util.AbstractMap<String, Integer> sim = new UnorderedMapStringInt();
|
||||
java.util.AbstractMap<Integer, Integer> iim = new UnorderedMapIntInt();
|
||||
|
||||
checkThat(sim.isEmpty());
|
||||
checkThat(iim.isEmpty());
|
|
@ -1,10 +1,10 @@
|
|||
import cpp11_li_std_unordered_set.*;
|
||||
import cpp11_std_unordered_set.*;
|
||||
|
||||
public class cpp11_li_std_unordered_set_runme {
|
||||
public class cpp11_std_unordered_set_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("cpp11_li_std_unordered_set");
|
||||
System.loadLibrary("cpp11_std_unordered_set");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||
System.exit(1);
|
||||
|
@ -20,7 +20,7 @@ public class cpp11_li_std_unordered_set_runme {
|
|||
|
||||
public static void main(String argv[]) throws Throwable
|
||||
{
|
||||
java.util.AbstractSet<String> ss = new StringUnorderedSet();
|
||||
java.util.AbstractSet<String> ss = new UnorderedSetString();
|
||||
|
||||
checkThat(ss.isEmpty());
|
||||
checkThat(!ss.contains("key"));
|
||||
|
@ -63,7 +63,7 @@ public class cpp11_li_std_unordered_set_runme {
|
|||
checkThat(ss.containsAll(found));
|
||||
checkThat(found.containsAll(ss));
|
||||
|
||||
java.util.AbstractSet<String> ss2 = new StringUnorderedSet(ss);
|
||||
java.util.AbstractSet<String> ss2 = new UnorderedSetString(ss);
|
||||
checkThat(ss2.containsAll(ss));
|
||||
checkThat(ss.containsAll(ss2));
|
||||
|
Loading…
Reference in New Issue