blob: 107ca48a049ca22fb17d9eee7242b9647f7a70b5 [file] [log] [blame]
This test checks some cases that might be affected by constant folding.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "abc" + "2.1" is "abc2.1"
PASS "123" + "2.1" is "1232.1"
PASS "123" + "=" is "123="
PASS "*" + "123" is "*123"
PASS !"abc" is false
PASS !"" is true
PASS 10.3 + 2.1 is 12.4
PASS 10.3 + "2.1" is "10.32.1"
PASS "10.3" + 2.1 is "10.32.1"
PASS "10.3" + "2.1" is "10.32.1"
PASS 10.3 + true is 11.3
PASS "10.3" + true is "10.3true"
PASS 10.3 + false is 10.3
PASS "10.3" + false is "10.3false"
PASS true + 2.1 is 3.1
PASS true + "2.1" is "true2.1"
PASS false + 2.1 is 2.1
PASS false + "2.1" is "false2.1"
PASS 10.3 - 2.1 is 8.200000000000001
PASS 10.3 - "2.1" is 8.200000000000001
PASS "10.3" - 2.1 is 8.200000000000001
PASS "10.3" - "2.1" is 8.200000000000001
PASS 10.3 - true is 9.3
PASS "10.3" - true is 9.3
PASS 10.3 - false is 10.3
PASS "10.3" - false is 10.3
PASS true - 2.1 is -1.1
PASS true - "2.1" is -1.1
PASS false - 2.1 is -2.1
PASS false - "2.1" is -2.1
PASS 10.3 * 2.1 is 21.630000000000003
PASS 10.3 * "2.1" is 21.630000000000003
PASS "10.3" * 2.1 is 21.630000000000003
PASS "10.3" * "2.1" is 21.630000000000003
PASS 10.3 * true is 10.3
PASS "10.3" * true is 10.3
PASS 10.3 * false is 0
PASS "10.3" * false is 0
PASS true * 10.3 is 10.3
PASS true * "10.3" is 10.3
PASS false * 10.3 is 0
PASS false * "10.3" is 0
PASS 10.3 / 2 is 5.15
PASS "10.3" / 2 is 5.15
PASS 10.3 / "2" is 5.15
PASS "10.3" / "2" is 5.15
PASS 10.3 / true is 10.3
PASS "10.3" / true is 10.3
PASS true / 2 is 0.5
PASS true / "2" is 0.5
PASS false / 2 is 0
PASS false / "2" is 0
PASS 10.3 % 2.1 is 1.9000000000000004
PASS "10.3" % 2.1 is 1.9000000000000004
PASS 10.3 % "2.1" is 1.9000000000000004
PASS "10.3" % "2.1" is 1.9000000000000004
PASS 10.3 % true is 0.3000000000000007
PASS "10.3" % true is 0.3000000000000007
PASS true % 2 is 1
PASS true % "2" is 1
PASS false % 2 is 0
PASS false % "2" is 0
PASS 10.3 << 2.1 is 40
PASS "10.3" << 2.1 is 40
PASS 10.3 << "2.1" is 40
PASS "10.3" << "2.1" is 40
PASS 10.3 << true is 20
PASS "10.3" << true is 20
PASS 10.3 << false is 10
PASS "10.3" << false is 10
PASS true << 2.1 is 4
PASS true << "2.1" is 4
PASS false << 2.1 is 0
PASS false << "2.1" is 0
PASS 10.3 >> 2.1 is 2
PASS "10.3" >> 2.1 is 2
PASS 10.3 >> "2.1" is 2
PASS "10.3" >> "2.1" is 2
PASS 10.3 >> true is 5
PASS "10.3" >> true is 5
PASS 10.3 >> false is 10
PASS "10.3" >> false is 10
PASS true >> 2.1 is 0
PASS true >> "2.1" is 0
PASS false >> 2.1 is 0
PASS false >> "2.1" is 0
PASS -10.3 >>> 2.1 is 1073741821
PASS "-10.3">>> 2.1 is 1073741821
PASS -10.3 >>> "2.1" is 1073741821
PASS "-10.3">>> "2.1" is 1073741821
PASS -10.3 >>> true is 2147483643
PASS "-10.3">>> true is 2147483643
PASS -10.3 >>> false is 4294967286
PASS "-10.3" >>> false is 4294967286
PASS true >>> 2.1 is 0
PASS true >>> "2.1" is 0
PASS false >>> 2.1 is 0
PASS false >>> "2.1" is 0
PASS 10.3 & 3.1 is 2
PASS "10.3" & 3.1 is 2
PASS 10.3 & "3.1" is 2
PASS "10.3" & "3.1" is 2
PASS 10.3 & true is 0
PASS "10.3" & true is 0
PASS 11.3 & true is 1
PASS "11.3" & true is 1
PASS 10.3 & false is 0
PASS "10.3" & false is 0
PASS 11.3 & false is 0
PASS "11.3" & false is 0
PASS true & 3.1 is 1
PASS true & "3.1" is 1
PASS true & 2.1 is 0
PASS true & "2.1" is 0
PASS false & 3.1 is 0
PASS false & "3.1" is 0
PASS false & 2.1 is 0
PASS false & "2.1" is 0
PASS 10.3 | 3.1 is 11
PASS "10.3" | 3.1 is 11
PASS 10.3 | "3.1" is 11
PASS "10.3" | "3.1" is 11
PASS 10.3 | true is 11
PASS "10.3" | true is 11
PASS 11.3 | true is 11
PASS "11.3" | true is 11
PASS 10.3 | false is 10
PASS "10.3" | false is 10
PASS 11.3 | false is 11
PASS "11.3" | false is 11
PASS true | 3.1 is 3
PASS true | "3.1" is 3
PASS true | 2.1 is 3
PASS true | "2.1" is 3
PASS false | 3.1 is 3
PASS false | "3.1" is 3
PASS false | 2.1 is 2
PASS false | "2.1" is 2
PASS 10.3 ^ 3.1 is 9
PASS "10.3" ^ 3.1 is 9
PASS 10.3 ^ "3.1" is 9
PASS "10.3" ^ "3.1" is 9
PASS 10.3 ^ true is 11
PASS "10.3" ^ true is 11
PASS 11.3 ^ true is 10
PASS "11.3" ^ true is 10
PASS 10.3 ^ false is 10
PASS "10.3" ^ false is 10
PASS 11.3 ^ false is 11
PASS "11.3" ^ false is 11
PASS true ^ 3.1 is 2
PASS true ^ "3.1" is 2
PASS true ^ 2.1 is 3
PASS true ^ "2.1" is 3
PASS false ^ 3.1 is 3
PASS false ^ "3.1" is 3
PASS false ^ 2.1 is 2
PASS false ^ "2.1" is 2
PASS 10.3 == 3.1 is false
PASS 3.1 == 3.1 is true
PASS "10.3" == 3.1 is false
PASS "3.1" == 3.1 is true
PASS 10.3 == "3.1" is false
PASS 3.1 == "3.1" is true
PASS "10.3" == "3.1" is false
PASS "3.1" == "3.1" is true
PASS 10.3 == true is false
PASS 1 == true is true
PASS "10.3" == true is false
PASS "1" == true is true
PASS 10.3 == false is false
PASS 0 == false is true
PASS "10.3" == false is false
PASS "0" == false is true
PASS true == 3.1 is false
PASS true == 1 is true
PASS true == "3.1" is false
PASS true == "1" is true
PASS false == 3.1 is false
PASS false == 0 is true
PASS false == "3.1" is false
PASS false == "0" is true
PASS true == true is true
PASS false == true is false
PASS true == false is false
PASS false == false is true
PASS 10.3 != 3.1 is true
PASS 3.1 != 3.1 is false
PASS "10.3" != 3.1 is true
PASS "3.1" != 3.1 is false
PASS 10.3 != "3.1" is true
PASS 3.1 != "3.1" is false
PASS "10.3" != "3.1" is true
PASS "3.1" != "3.1" is false
PASS 10.3 != true is true
PASS 1 != true is false
PASS "10.3" != true is true
PASS "1" != true is false
PASS 10.3 != false is true
PASS 0 != false is false
PASS "10.3" != false is true
PASS "0" != false is false
PASS true != 3.1 is true
PASS true != 1 is false
PASS true != "3.1" is true
PASS true != "1" is false
PASS false != 3.1 is true
PASS false != 0 is false
PASS false != "3.1" is true
PASS false != "0" is false
PASS true != true is false
PASS false != true is true
PASS true != false is true
PASS false != false is false
PASS 10.3 > 3.1 is true
PASS 3.1 > 3.1 is false
PASS "10.3" > 3.1 is true
PASS "3.1" > 3.1 is false
PASS 10.3 > "3.1" is true
PASS 3.1 > "3.1" is false
PASS "10.3" > "3.1" is false
PASS "3.1" > "3.1" is false
PASS 10.3 > true is true
PASS 0 > true is false
PASS "10.3" > true is true
PASS "0" > true is false
PASS 10.3 > false is true
PASS -1 > false is false
PASS "10.3" > false is true
PASS "-1" > false is false
PASS true > 0.1 is true
PASS true > 1.1 is false
PASS true > "0.1" is true
PASS true > "1.1" is false
PASS false > -3.1 is true
PASS false > 0 is false
PASS false > "-3.1" is true
PASS false > "0" is false
PASS true > true is false
PASS false > true is false
PASS true > false is true
PASS false > false is false
PASS 10.3 < 3.1 is false
PASS 2.1 < 3.1 is true
PASS "10.3" < 3.1 is false
PASS "2.1" < 3.1 is true
PASS 10.3 < "3.1" is false
PASS 2.1 < "3.1" is true
PASS "10.3" < "3.1" is true
PASS "2.1" < "3.1" is true
PASS 10.3 < true is false
PASS 0 < true is true
PASS "10.3" < true is false
PASS "0" < true is true
PASS 10.3 < false is false
PASS -1 < false is true
PASS "10.3" < false is false
PASS "-1" < false is true
PASS true < 0.1 is false
PASS true < 1.1 is true
PASS true < "0.1" is false
PASS true < "1.1" is true
PASS false < -3.1 is false
PASS false < 0.1 is true
PASS false < "-3.1" is false
PASS false < "0.1" is true
PASS true < true is false
PASS false < true is true
PASS true < false is false
PASS false < false is false
PASS 10.3 >= 3.1 is true
PASS 2.1 >= 3.1 is false
PASS "10.3" >= 3.1 is true
PASS "2.1" >= 3.1 is false
PASS 10.3 >= "3.1" is true
PASS 2.1 >= "3.1" is false
PASS "10.3" >= "3.1" is false
PASS "2.1" >= "3.1" is false
PASS 10.3 >= true is true
PASS 0 >= true is false
PASS "10.3" >= true is true
PASS "0" >= true is false
PASS 10.3 >= false is true
PASS -1 >= false is false
PASS "10.3" >= false is true
PASS "-1" >= false is false
PASS true >= 0.1 is true
PASS true >= 1.1 is false
PASS true >= "0.1" is true
PASS true >= "1.1" is false
PASS false >= -3.1 is true
PASS false >= 0 is true
PASS false >= "-3.1" is true
PASS false >= "0" is true
PASS true >= true is true
PASS false >= true is false
PASS true >= false is true
PASS false >= false is true
PASS 10.3 <= 3.1 is false
PASS 2.1 <= 3.1 is true
PASS "10.3" <= 3.1 is false
PASS "2.1" <= 3.1 is true
PASS 10.3 <= "3.1" is false
PASS 2.1 <= "3.1" is true
PASS "10.3" <= "3.1" is true
PASS "2.1" <= "3.1" is true
PASS 10.3 <= true is false
PASS 0 <= true is true
PASS "10.3" <= true is false
PASS "0" <= true is true
PASS 10.3 <= false is false
PASS -1 <= false is true
PASS "10.3" <= false is false
PASS "-1" <= false is true
PASS true <= 0.1 is false
PASS true <= 1.1 is true
PASS true <= "0.1" is false
PASS true <= "1.1" is true
PASS false <= -3.1 is false
PASS false <= 0.1 is true
PASS false <= "-3.1" is false
PASS false <= "0.1" is true
PASS true <= true is true
PASS false <= true is true
PASS true <= false is false
PASS false <= false is true
PASS true && true is true
PASS true && false is false
PASS false && true is false
PASS false && false is false
PASS 1.1 && true is true
PASS 1.1 && false is false
PASS 0 && true is 0
PASS 0 && false is 0
PASS "1.1" && true is true
PASS "1.1" && false is false
PASS "0" && true is true
PASS "0" && false is false
PASS true && 1.1 is 1.1
PASS true && 0 is 0
PASS false && 1.1 is false
PASS false && 0 is false
PASS true && "1.1" is "1.1"
PASS true && "0" is "0"
PASS false && "1.1" is false
PASS false && "0" is false
PASS 1.1 && 1.1 is 1.1
PASS 1.1 && 0 is 0
PASS 0 && 1.1 is 0
PASS 0 && 0 is 0
PASS "1.1" && 1.1 is 1.1
PASS "1.1" && 0 is 0
PASS "0" && 1.1 is 1.1
PASS "0" && 0 is 0
PASS 1.1 && "1.1" is "1.1"
PASS 1.1 && "0" is "0"
PASS 0 && "1.1" is 0
PASS 0 && "0" is 0
PASS "1.1" && "1.1" is "1.1"
PASS "1.1" && "0" is "0"
PASS "0" && "1.1" is "1.1"
PASS "0" && "0" is "0"
PASS true || true is true
PASS true || false is true
PASS false || true is true
PASS false || false is false
PASS 1.1 || true is 1.1
PASS 1.1 || false is 1.1
PASS 0 || true is true
PASS 0 || false is false
PASS "1.1" || true is "1.1"
PASS "1.1" || false is "1.1"
PASS "0" || true is "0"
PASS "0" || false is "0"
PASS true || 1.1 is true
PASS true || 0 is true
PASS false || 1.1 is 1.1
PASS false || 0 is 0
PASS true || "1.1" is true
PASS true || "0" is true
PASS false || "1.1" is "1.1"
PASS false || "0" is "0"
PASS 1.1 || 1.1 is 1.1
PASS 1.1 || 0 is 1.1
PASS 0 || 1.1 is 1.1
PASS 0 || 0 is 0
PASS "1.1" || 1.1 is "1.1"
PASS "1.1" || 0 is "1.1"
PASS "0" || 1.1 is "0"
PASS "0" || 0 is "0"
PASS 1.1 || "1.1" is 1.1
PASS 1.1 || "0" is 1.1
PASS 0 || "1.1" is "1.1"
PASS 0 || "0" is "0"
PASS "1.1" || "1.1" is "1.1"
PASS "1.1" || "0" is "1.1"
PASS "0" || "1.1" is "0"
PASS "0" || "0" is "0"
PASS +3.1 is 3.1
PASS + +3.1 is 3.1
PASS +"3.1" is 3.1
PASS +true is 1
PASS +false is 0
PASS -3.1 is -3.1
PASS - -3.1 is 3.1
PASS -"3.1" is -3.1
PASS -true is -1
PASS -false is -0
PASS ~3 is -4
PASS ~ ~3 is 3
PASS ~"3" is -4
PASS ~true is -2
PASS ~false is -1
PASS !true is false
PASS !false is true
PASS !3 is false
PASS !0 is true
PASS 10.3 / 0 is Infinity
PASS "10.3" / 0 is Infinity
PASS -10.3 / 0 is -Infinity
PASS "-10.3" / 0 is -Infinity
PASS true / 0 is Infinity
PASS false / 0 is NaN
PASS 0 / 0 is NaN
PASS 10.3 / -0 is -Infinity
PASS "10.3" / -0 is -Infinity
PASS -10.3 / -0 is Infinity
PASS "-10.3" / -0 is Infinity
PASS true / -0 is -Infinity
PASS false / -0 is NaN
PASS 0 / -0 is NaN
PASS 1 / -0 is -Infinity
PASS 1 / - 0 is -Infinity
PASS 1 / - -0 is Infinity
PASS 1 / - - -0 is -Infinity
PASS successfullyParsed is true
TEST COMPLETE