This commit is contained in:
Sandipsinh Rathod 2024-11-06 18:47:13 -05:00
parent 93552eb95a
commit 1e0c4e63fb
No known key found for this signature in database

@ -286,9 +286,10 @@ int main() {
try {
n4 = n5 / n6;
if (static_cast<double>(n4) != ExactNumber(1, 0))
throw error_msg("operator/ involving 0", n4, 0.0 / 1.0);
throw error_msg("operator/ involving 0 (should fail)", n4, 0.0 / 1.0);
}
catch (const exception& m) {
catch (const exception &m) {
cout << m.what() << endl;
}
@ -300,7 +301,8 @@ int main() {
}
cout << endl;
num_tests = 0;
num_tests = num_failed = 0;
ExactNumber one(1, 1), two(2, 1), negative_one_point_five(-3, 2), zero(0, 1), three_point_five(7, 2), one_again(2,
2), fdiv_test_case(
4195835, 3145727);