Files
wren/test/core/number/comparison.wren
T
Bob Nystrom 64eccdd9be Reorganize tests and benchmark scripts.
Mainly to get rid of one top level directory. But this will
also be useful when there are tests of the embedding API.
2015-03-14 12:45:56 -07:00

28 lines
782 B
Plaintext

IO.print(1 < 2) // expect: true
IO.print(2 < 2) // expect: false
IO.print(2 < 1) // expect: false
IO.print(1 <= 2) // expect: true
IO.print(2 <= 2) // expect: true
IO.print(2 <= 1) // expect: false
IO.print(1 > 2) // expect: false
IO.print(2 > 2) // expect: false
IO.print(2 > 1) // expect: true
IO.print(1 >= 2) // expect: false
IO.print(2 >= 2) // expect: true
IO.print(2 >= 1) // expect: true
// Zero and negative zero compare the same.
IO.print(0 < -0) // expect: false
IO.print(-0 < 0) // expect: false
IO.print(0 > -0) // expect: false
IO.print(-0 > 0) // expect: false
IO.print(0 <= -0) // expect: true
IO.print(-0 <= 0) // expect: true
IO.print(0 >= -0) // expect: true
IO.print(-0 >= 0) // expect: true
// TODO: Wrong type for RHS.