diff options
author | Son Ho | 2021-11-24 16:43:59 +0100 |
---|---|---|
committer | Son Ho | 2021-11-24 16:43:59 +0100 |
commit | 3c2de3a3fe4042967f59192286763ba648df01ec (patch) | |
tree | cd9f474abe5e3052d245dcffcbacf559e3529232 /rust-tests/src | |
parent | 7cc0eeeec8206cf4e0c22ef1608199461c88ebac (diff) |
Implement eval_binary_op
Diffstat (limited to 'rust-tests/src')
-rw-r--r-- | rust-tests/src/main.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rust-tests/src/main.rs b/rust-tests/src/main.rs index b7478c0e..3e0e7a43 100644 --- a/rust-tests/src/main.rs +++ b/rust-tests/src/main.rs @@ -1,5 +1,9 @@ /// The following code generates the limits for the scalar types +fn test_modulo(x: i32, y: i32) { + println!("{} % {} = {}", x, y, x % y); +} + fn main() { let ints_lower = [ "isize", "i8", "i16", "i32", "i64", "i128", "usize", "u8", "u16", "u32", "u64", "u128", @@ -72,4 +76,9 @@ fn main() { println!("| Types.{} -> Ok ({} i)", s, s); } println!("\n"); + + // Modulo tests + test_modulo(1, 2); + test_modulo(-1, 2); + test_modulo(-1, -2); } |