Add conversion to bool tests as conditionals
This commit is contained in:
parent
508729ec77
commit
9f30d84f39
17
unittests/conversion_to_bool.chai
Normal file
17
unittests/conversion_to_bool.chai
Normal file
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user