roza/tests/acceptances/cmp.roza

35 lines
573 B
Plaintext

# Equality
# ========
# for num
assert 5 == 5
assert 3 != 5
# for bool
assert true == true
assert false == false
assert false != true
# for str
assert "hello" == "hello"
assert "world" != "hello"
# different types
assert 7 != "hello"
assert false != 23
assert "bim" != true
# binary comparison operators
assert 3 < 5 == true
assert 5 < 5 == false
assert 7 < 5 == false
assert 3 <= 5 == true
assert 5 <= 5 == true
assert 7 <= 5 == false
assert 3 > 5 == false
assert 5 > 5 == false
assert 7 > 5 == true
assert 3 >= 5 == false
assert 5 >= 5 == true
assert 7 >= 5 == true