Bläddra i källkod

[lua] add test for issue6001

Justin Donaldson 8 år sedan
förälder
incheckning
9047be8cf8
1 ändrade filer med 15 tillägg och 0 borttagningar
  1. 15 0
      tests/unit/src/unit/issues/Issue6001.hx

+ 15 - 0
tests/unit/src/unit/issues/Issue6001.hx

@@ -0,0 +1,15 @@
+package unit.issues;
+class Issue6001 extends Test {
+#if lua
+	public function test() {
+		var t = lua.Table.create({a : 1, b : 2});
+		eq("{ a : 1, b : 2 }", t + '');
+
+		var t = lua.Table.create([1,2,3]);
+		eq("{ 1 : 1, 2 : 2, 3 : 3 }", t + '');
+
+		var t = lua.Table.create([1,2,3], {a : 1, b : 2});
+		eq("{ 1 : 1, 2 : 2, 3 : 3, a : 1, b : 2 }", t + '');
+	}
+#end
+}