Wrap std::list::empty as isEmpty in Java
This commit is contained in:
parent
109a60add6
commit
990c597365
2 changed files with 7 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue