Explorar o código

found that on my HDD...

Simon Krajewski %!s(int64=12) %!d(string=hai) anos
pai
achega
a56923faa5
Modificáronse 1 ficheiros con 30 adicións e 0 borrados
  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;