aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test_comparison_operators.sh
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-09-11 00:04:08 +0900
committernsfisis <nsfisis@gmail.com>2025-09-11 00:35:34 +0900
commitb3efe5b6c04e809ba0a67308994c91adfbd15eff (patch)
tree5ac9bf1702a21e9a952bce90ee934dc3bd455a42 /tests/test_comparison_operators.sh
parent9a2fbf6f4854b1f2cfd5979b91d5b3d7e183d487 (diff)
downloadducc-b3efe5b6c04e809ba0a67308994c91adfbd15eff.tar.gz
ducc-b3efe5b6c04e809ba0a67308994c91adfbd15eff.tar.zst
ducc-b3efe5b6c04e809ba0a67308994c91adfbd15eff.zip
test: rewrite some tests in C language
Diffstat (limited to 'tests/test_comparison_operators.sh')
-rw-r--r--tests/test_comparison_operators.sh52
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
-