diff options
author | Vincent Ambo <mail@tazj.in> | 2021-02-28T14·00+0200 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-02-28T14·36+0000 |
commit | 369f504250fe6508d3b927c6c8320a2525edfad1 (patch) | |
tree | d9df01a16a3a96a95f9089ccff96a8d5fae6b129 /users/tazjin/rlox/src/bytecode/tests.rs | |
parent | c58fe2093e2a2870fc76ea55aa2de8e5aa6dab7d (diff) |
feat(tazjin/rlox): Implement comparison operators r/2256
Change-Id: I03b751db52a3bd502fb4fbda6e89cad087ccad74 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2575 Reviewed-by: tazjin <mail@tazj.in> Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/rlox/src/bytecode/tests.rs')
-rw-r--r-- | users/tazjin/rlox/src/bytecode/tests.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/users/tazjin/rlox/src/bytecode/tests.rs b/users/tazjin/rlox/src/bytecode/tests.rs index 500779301b04..9b31d5469be1 100644 --- a/users/tazjin/rlox/src/bytecode/tests.rs +++ b/users/tazjin/rlox/src/bytecode/tests.rs @@ -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); +} |