ChaiScript/unittests/conversion_to_bool.chai
2016-10-26 12:29:30 -06:00

18 lines
237 B
ChaiScript

// 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);
}