Skip to content
Snippets Groups Projects
Commit 1c99f148 authored by Lisa's avatar Lisa
Browse files

two operants

parent 67be2b2d
No related branches found
No related tags found
1 merge request!5Fix missing operands
......@@ -33,14 +33,20 @@ TEST_CASE( "Test modulo function", "[calc]") {
REQUIRE( evaluate("51%") == 0 );
}
TEST_CASE("Test sqrt function", "[calc]") {
REQUIRE( evaluate("9sqrt") == 3 );
REQUIRE( evaluate("49sqrt") == 7 );
REQUIRE( evaluate("0sqrt") == 0 );
}
//TEST_CASE("Test sqrt function", "[calc]") {
// REQUIRE( evaluate("9sqrt") == 3 );
// REQUIRE( evaluate("49sqrt") == 7 );
// REQUIRE( evaluate("0sqrt") == 0 );
//}
TEST_CASE( "Basic power test", "[calc]") {
REQUIRE( evaluate("22^") == 4 );
REQUIRE( evaluate("43^") == 64 );
REQUIRE( evaluate("25^") == 32 );
}
TEST_CASE( "Two Operants in a row", "[calc]") {
//REQUIRE_THROWS( evaluate("11+3-+4") );
//REQUIRE_THROWS( evaluate("11/3*+4") );
}
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