feat(tazjin/rlox): Implement comparison operators
Change-Id: I03b751db52a3bd502fb4fbda6e89cad087ccad74 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2575 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
This commit is contained in:
parent
c58fe2093e
commit
369f504250
4 changed files with 43 additions and 0 deletions
|
|
@ -88,3 +88,13 @@ fn equality() {
|
|||
expect_bool("42 == true", false);
|
||||
expect_bool("!42 == !true", true);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn comparisons() {
|
||||
expect_bool("42 > 23", true);
|
||||
expect_bool("42 < 23", false);
|
||||
expect_bool("42 <= 42", true);
|
||||
expect_bool("42 <= 23", false);
|
||||
expect_bool("42 >= 42", true);
|
||||
expect_bool("42 >= 23", true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue