Skip to content
Snippets Groups Projects
Commit 2d1f7bd9 authored by Alexander Funke's avatar Alexander Funke Committed by Niklas Hannekotte
Browse files

Added tests div by zero not allowed

parent 131ee5b8
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,14 @@ TEST_CASE( "Test modulo function", "[calc]") {
REQUIRE( evaluate("51%") == 0 );
}
TEST_CASE( "Div by zero not allowed", "[calc]") {
// REQUIRE_THROWS( evaluate("40/") );
// REQUIRE_THROWS( evaluate("00/") );
// REQUIRE_THROWS( evaluate("90/") );
}
TEST_CASE( "Basic power test", "[calc]") {
REQUIRE( evaluate("22^") == 4 );
REQUIRE( evaluate("43^") == 64 );
REQUIRE( evaluate("25^") == 32 );
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment