Wrap std::list::empty as isEmpty in Java

This commit is contained in:
William S Fulton 2017-06-23 15:26:53 +01:00
commit 990c597365
2 changed files with 7 additions and 1 deletions

View file

@ -16,7 +16,12 @@ public class li_std_list_runme {
IntList v1 = new IntList();
DoubleList v2 = new DoubleList();
v1.add(123);
if (!v1.isEmpty()) throw new RuntimeException("v1 test (1) failed");
if (v1.size() != 0) throw new RuntimeException("v1 test (2) failed");
if (!v1.add(123)) throw new RuntimeException("v1 test (3) failed");
if (v1.size() != 1) throw new RuntimeException("v1 test (4) failed");
if (v1.isEmpty()) throw new RuntimeException("v1 test (5) failed");
if (v1.get(0) != 123) throw new RuntimeException("v1 test failed");
StructList v4 = new StructList();