aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test_ternary_operator.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_ternary_operator.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_ternary_operator.sh')
-rw-r--r--tests/test_ternary_operator.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/test_ternary_operator.sh b/tests/test_ternary_operator.sh
index c98ff43..c63f581 100644
--- a/tests/test_ternary_operator.sh
+++ b/tests/test_ternary_operator.sh
@@ -1,12 +1,8 @@
-cat <<'EOF' > expected
-2 5
-EOF
-
-test_diff <<'EOF'
-int printf();
+test_exit_code 0 <<'EOF'
+#include "../../helpers.h"
int main() {
- printf("%d %d\n", 1 ? 2 : 3, 0 ? 4 : 5);
+ ASSERT_EQ(2, 1 ? 2 : 3);
+ ASSERT_EQ(5, 0 ? 4 : 5);
}
EOF
-