diff --git a/unittests/conversion_to_bool.chai b/unittests/conversion_to_bool.chai new file mode 100644 index 0000000..d5512bf --- /dev/null +++ b/unittests/conversion_to_bool.chai @@ -0,0 +1,17 @@ + +// all we care is that this executes, really + +add_type_conversion(type("int"), type("bool"), fun(int i) { return i != 0; }); + +if (0) { + assert_true(false); +} + +while (0) { + assert_true(false); +} + +for (; 0; ) { + assert_true(false); +} +