Merge branch 'csharp-set-fixes'

* csharp-set-fixes:
  Fix std::vector<> Java typemaps for primitive types
  Allow std::set<> C# typemaps to work for non-nullable types too
  Replace leftover string with the proper type in C# set typemap
This commit is contained in:
William S Fulton 2019-07-12 08:13:19 +01:00
commit 1e66c13abd
5 changed files with 58 additions and 4 deletions

View file

@ -71,5 +71,20 @@ public class li_std_set_runme {
checkThat(ss.removeAll(found));
checkThat(ss.isEmpty());
checkThat(ss.size() == 0);
// Check a set of another type.
java.util.AbstractSet<Foo> fooSet = new FooSet();
checkThat(fooSet.isEmpty());
checkThat(fooSet.add(new Foo(17)));
checkThat(fooSet.size() == 1);
// And a set of primitive type.
java.util.AbstractSet<Integer> intSet = new IntSet();
checkThat(intSet.isEmpty());
checkThat(intSet.add(17));
checkThat(!intSet.add(17));
checkThat(intSet.size() == 1);
checkThat(intSet.add(289));
checkThat(intSet.size() == 2);
}
}