ChaiScript/unittests/divide_by_zero_protection.chai
2015-01-09 20:20:38 -07:00

10 lines
168 B
ChaiScript

try {
3/0
assert_true(false); // should never get here
} catch (e) {
assert_equal("Arithmetic error: divide by zero", e.what())
}
assert_equal(3/0.0, Infinity)