From 3c2de3a3fe4042967f59192286763ba648df01ec Mon Sep 17 00:00:00 2001 From: Son Ho Date: Wed, 24 Nov 2021 16:43:59 +0100 Subject: Implement eval_binary_op --- rust-tests/src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rust-tests') 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); } -- cgit v1.2.3