浏览代码

found that on my HDD...

Simon Krajewski 12 年之前
父节点
当前提交
a56923faa5
共有 1 个文件被更改,包括 30 次插入0 次删除
  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;