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:
Vincent Ambo 2021-02-28 16:00:01 +02:00 committed by tazjin
parent c58fe2093e
commit 369f504250
4 changed files with 43 additions and 0 deletions

View file

@ -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);
}