Files
wren/test/core/number/comparison.wren
T

28 lines
862 B
Plaintext
Raw Normal View History

2015-09-15 07:46:09 -07:00
System.print(1 < 2) // expect: true
System.print(2 < 2) // expect: false
System.print(2 < 1) // expect: false
2015-09-15 07:46:09 -07:00
System.print(1 <= 2) // expect: true
System.print(2 <= 2) // expect: true
System.print(2 <= 1) // expect: false
2015-09-15 07:46:09 -07:00
System.print(1 > 2) // expect: false
System.print(2 > 2) // expect: false
System.print(2 > 1) // expect: true
2015-09-15 07:46:09 -07:00
System.print(1 >= 2) // expect: false
System.print(2 >= 2) // expect: true
System.print(2 >= 1) // expect: true
2013-12-20 12:42:11 -08:00
// Zero and negative zero compare the same.
2015-09-15 07:46:09 -07:00
System.print(0 < -0) // expect: false
System.print(-0 < 0) // expect: false
System.print(0 > -0) // expect: false
System.print(-0 > 0) // expect: false
System.print(0 <= -0) // expect: true
System.print(-0 <= 0) // expect: true
System.print(0 >= -0) // expect: true
System.print(-0 >= 0) // expect: true
2013-12-20 12:42:11 -08:00
// TODO: Wrong type for RHS.