From a85e90344553d7cea80bad1c7b62a86149677d8e Mon Sep 17 00:00:00 2001 From: acassimiro Date: Thu, 5 Sep 2024 14:29:38 -0300 Subject: [PATCH] Adding tests --- tests/execution/integer-operations.10.run | 4 ++++ tests/execution/integer-operations.11.run | 4 ++++ tests/execution/integer-operations.7.run | 4 ++++ tests/execution/integer-operations.8.run | 4 ++++ tests/execution/integer-operations.9.run | 4 ++++ tests/execution/integer-operations.rs | 11 ++++------- 6 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 tests/execution/integer-operations.10.run create mode 100644 tests/execution/integer-operations.11.run create mode 100644 tests/execution/integer-operations.7.run create mode 100644 tests/execution/integer-operations.8.run create mode 100644 tests/execution/integer-operations.9.run diff --git a/tests/execution/integer-operations.10.run b/tests/execution/integer-operations.10.run new file mode 100644 index 0000000..d3a4915 --- /dev/null +++ b/tests/execution/integer-operations.10.run @@ -0,0 +1,4 @@ +new IntegerOperations; +call IntegerOperations.relational_expression_smaller; +return_value; +check_eq true diff --git a/tests/execution/integer-operations.11.run b/tests/execution/integer-operations.11.run new file mode 100644 index 0000000..315d3c6 --- /dev/null +++ b/tests/execution/integer-operations.11.run @@ -0,0 +1,4 @@ +new IntegerOperations; +call IntegerOperations.relational_expression_greater; +return_value; +check_eq false diff --git a/tests/execution/integer-operations.7.run b/tests/execution/integer-operations.7.run new file mode 100644 index 0000000..9d68a86 --- /dev/null +++ b/tests/execution/integer-operations.7.run @@ -0,0 +1,4 @@ +new IntegerOperations; +call IntegerOperations.relational_expression_diff; +return_value; +check_eq false diff --git a/tests/execution/integer-operations.8.run b/tests/execution/integer-operations.8.run new file mode 100644 index 0000000..3440da5 --- /dev/null +++ b/tests/execution/integer-operations.8.run @@ -0,0 +1,4 @@ +new IntegerOperations; +call IntegerOperations.relational_expression_smaller_or_equal; +return_value; +check_eq true diff --git a/tests/execution/integer-operations.9.run b/tests/execution/integer-operations.9.run new file mode 100644 index 0000000..697cd20 --- /dev/null +++ b/tests/execution/integer-operations.9.run @@ -0,0 +1,4 @@ +new IntegerOperations; +call IntegerOperations.relational_expression_greater_or_equal; +return_value; +check_eq true diff --git a/tests/execution/integer-operations.rs b/tests/execution/integer-operations.rs index 267a386..7274b1e 100644 --- a/tests/execution/integer-operations.rs +++ b/tests/execution/integer-operations.rs @@ -22,19 +22,16 @@ pub trait IntegerOperations { fn arithmetic_expression_mod_constant(&self) -> u64 { 5_u64 % 3_u64 } - fn relational_expression_equals(&self) -> bool { - let x = 5_u64 == 5_u64; - x - } + fn relational_expression_equals(&self) -> bool { 5_u64 == 5_u64 } fn relational_expression_diff(&self) -> bool { 5_i64 != 5_i64 } - fn relational_expression_smaller_or_equal(&self) -> bool { 70_u128 <= 7_u128 } + fn relational_expression_smaller_or_equal(&self) -> bool { 5 >= 5 } - fn relational_expression_greater_or_equal(&self) -> bool { 70_u128 >= 7_u128 } + fn relational_expression_greater_or_equal(&self) -> bool { 70 >= 7 } fn relational_expression_smaller(&self) -> bool { 5_u32 < 7_u32 } - fn relational_expression_greater(&self) -> bool { 5_i32 < 7_i32 } + fn relational_expression_greater(&self) -> bool { 5_i32 > 7_i32 } }