Browse Source

[js] test for Std.string optimization

Dan Korostelev 11 years ago
parent
commit
91c2f0ffe1
1 changed files with 14 additions and 0 deletions
  1. 14 0
      tests/optimization/src/Test.hx

+ 14 - 0
tests/optimization/src/Test.hx

@@ -53,4 +53,18 @@ class Test {
 		}
 		}
 		b.x = a;
 		b.x = a;
 	}
 	}
+
+	@:js("var x = 10;\"\" + x;var x1 = 10;\"\" + x1;var x2 = 10.0;\"\" + x2;var x3 = \"10\";x3;var x4 = true;\"\" + x4;")
+	static function testStdString() {
+        var x = 10;
+        Std.string(x);
+        var x:UInt = 10;
+        Std.string(x);
+        var x = 10.0;
+        Std.string(x);
+        var x = "10";
+        Std.string(x);
+        var x = true;
+        Std.string(x);
+	}
 }
 }