Reverted previous change to what was believed to be an errant test case.
Also added a test for NaN safety
This commit is contained in:
parent
992324b425
commit
b1ba298ffc
|
@ -175,4 +175,7 @@ ok a is '123456'
|
||||||
ok + +1 is - -1
|
ok + +1 is - -1
|
||||||
|
|
||||||
#891: incorrect inversion of chained comparisons
|
#891: incorrect inversion of chained comparisons
|
||||||
ok (true unless 0 > 1 > 2)
|
(->
|
||||||
|
ok (true unless 0 > 1 > 2)
|
||||||
|
ok (true unless (NaN = 0/0) < 0/0 < NaN)
|
||||||
|
)()
|
||||||
|
|
|
@ -59,7 +59,7 @@ result = switch
|
||||||
when '' not of {''} then 2
|
when '' not of {''} then 2
|
||||||
when [] not instanceof Array then 3
|
when [] not instanceof Array then 3
|
||||||
when true is false then 4
|
when true is false then 4
|
||||||
when 'x' > 'y' > 'z' then 5
|
when 'x' < 'y' > 'z' then 5
|
||||||
when 'a' in ['b', 'c'] then 6
|
when 'a' in ['b', 'c'] then 6
|
||||||
when 'd' in (['e', 'f']) then 7
|
when 'd' in (['e', 'f']) then 7
|
||||||
else ok
|
else ok
|
||||||
|
|
Loading…
Reference in New Issue