|
@@ -94,13 +94,16 @@ class TestBasetypes extends Test {
|
|
|
|
|
|
// Brackets around array values should not be stripped.
|
|
|
var x = [1, "hello"];
|
|
|
- eq("" + x, "[1, hello]");
|
|
|
+ eq("" + x, "[1,hello]");
|
|
|
eq(x + "", "" + x);
|
|
|
+
|
|
|
+ var x = [[1], [2, 3]];
|
|
|
+ eq("" + x, "[[1],[2,3]]");
|
|
|
|
|
|
// This is also true for iterables that are arrays.
|
|
|
var x:Iterable<Dynamic> = [1, "hello"];
|
|
|
- eq("" + x, "[1, hello]");
|
|
|
- eq(x + "", "" + x);
|
|
|
+ eq("" + x, "[1,hello]");
|
|
|
+ eq(x + "", "" + x);
|
|
|
|
|
|
// I don't think this should throw an exception on PHP.
|
|
|
try {
|
|
@@ -108,13 +111,20 @@ class TestBasetypes extends Test {
|
|
|
} catch (e:Dynamic) {
|
|
|
Test.report("Could not convert Iterator to String");
|
|
|
}
|
|
|
+
|
|
|
+ var str = "he\nlo\"'";
|
|
|
+ eq( Std.string(str), str);
|
|
|
+ eq( Std.string([str]), "[" + str + "]");
|
|
|
+
|
|
|
+ var e = MyEnum.C(0, "h");
|
|
|
+ eq( Std.string(e), "C(0,h)");
|
|
|
|
|
|
// This also seems rather odd on some platforms.
|
|
|
var x = ["4", 1];
|
|
|
t(Std.is(x[0], String));
|
|
|
t(Std.is(x[0] + x[0], String));
|
|
|
t(Std.is(x[1] + x[1], Int));
|
|
|
- t(Std.is(x[0] + x[1], String));
|
|
|
+ t(Std.is(x[0] + x[1], String));
|
|
|
}
|
|
|
|
|
|
function testMath() {
|