ソースを参照

Test comparison of strings that contain only ints.

These should be compared like strings, not like (parsed) integers.
Georg Koester 10 年 前
コミット
a852fb4094
1 ファイル変更5 行追加1 行削除
  1. 5 1
      tests/unit/src/unitstd/String.unit.hx

+ 5 - 1
tests/unit/src/unitstd/String.unit.hx

@@ -153,4 +153,8 @@ s.substring(100, 0) == "xfooxfooxxbarxbarxx";
 s.substring(120, 100) == "";
 
 // fromCharCode
-String.fromCharCode(65) == "A";
+String.fromCharCode(65) == "A";
+
+// ensure int strings compared as strings, not parsed ints (issue #3734)
+("3" > "11") == true;
+(" 3" < "3") == true;