diff options
Diffstat (limited to 'tests/test_comparison_operators.sh')
| -rw-r--r-- | tests/test_comparison_operators.sh | 52 |
1 files changed, 9 insertions, 43 deletions
diff --git a/tests/test_comparison_operators.sh b/tests/test_comparison_operators.sh index 3b6d827..7bcb689 100644 --- a/tests/test_comparison_operators.sh +++ b/tests/test_comparison_operators.sh @@ -1,48 +1,14 @@ -test_exit_code 1 <<'EOF' -int main() { - return 0 == 0; -} -EOF - test_exit_code 0 <<'EOF' -int main() { - return 123 != 123; -} -EOF - -test_exit_code 1 <<'EOF' -int main() { - return 123 != 456; -} -EOF - -test_exit_code 0 <<'EOF' -int main() { - return 123 == 124; -} -EOF - -test_exit_code 1 <<'EOF' -int main() { - return 123 < 567; -} -EOF +#include "../../helpers.h" -test_exit_code 1 <<'EOF' int main() { - return 123 <= 567; + ASSERT_EQ(1, 0 == 0); + ASSERT_EQ(0, 123 != 123); + ASSERT_EQ(1, 123 != 456); + ASSERT_EQ(0, 123 == 124); + ASSERT_EQ(1, 123 < 567); + ASSERT_EQ(1, 123 <= 567); + ASSERT_EQ(1, 123 <= 123); + ASSERT_EQ(0, 123 < 123); } EOF - -test_exit_code 1 <<'EOF' -int main() { - return 123 <= 123; -} -EOF - -test_exit_code 0 <<'EOF' -int main() { - return 123 < 123; -} -EOF - |
