Pārlūkot izejas kodu

Test comparison of strings that contain only ints.

These should be compared like strings, not like (parsed) integers.
Georg Koester 10 gadi atpakaļ
vecāks
revīzija
a852fb4094
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  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) == "";
 s.substring(120, 100) == "";
 
 
 // fromCharCode
 // 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;