aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/test_bool_type.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_bool_type.sh')
-rw-r--r--tests/test_bool_type.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_bool_type.sh b/tests/test_bool_type.sh
new file mode 100644
index 0000000..16087bf
--- /dev/null
+++ b/tests/test_bool_type.sh
@@ -0,0 +1,14 @@
+cat <<'EOF' > expected
+1,0
+1,1,1
+EOF
+test_diff <<'EOF'
+int printf(const char*, ...);
+
+int main() {
+ bool b1 = true, b0 = false;
+ printf("%d,%d\n", b1, b0);
+ printf("%d,%d,%d\n", sizeof(b1), sizeof(b0), sizeof(bool));
+}
+EOF
+