Selaa lähdekoodia

found that on my HDD...

Simon Krajewski 12 vuotta sitten
vanhempi
commit
a56923faa5
1 muutettua tiedostoa jossa 30 lisäystä ja 0 poistoa
  1. 30 0
      tests/unit/unitstd/haxe/ds/GenericStack.unit.hx

+ 30 - 0
tests/unit/unitstd/haxe/ds/GenericStack.unit.hx

@@ -0,0 +1,30 @@
+var gs = new haxe.ds.GenericStack<String>();
+gs.isEmpty() == true;
+gs.first() == null;
+gs.pop() == null;
+gs.remove(null) == false;
+gs.add("foo");
+gs.isEmpty() == false;
+gs.first() == "foo";
+gs.pop() == "foo";
+gs.isEmpty() == true;
+gs.first() == null;
+gs.pop() == null;
+gs.add("foo");
+gs.first() == "foo";
+gs.remove("foo") == true;
+gs.isEmpty() == true;
+gs.add("foo");
+gs.add("bar");
+gs.pop() == "bar";
+gs.first() == "foo";
+gs.pop() == "foo";
+gs.add(null);
+gs.add(null);
+gs.isEmpty() == false;
+gs.first() == null;
+gs.pop() == null;
+gs.remove(null) == true;
+gs.isEmpty() == true;
+gs.first() == null;
+gs.pop() == null;