Skip to content
Snippets Groups Projects

two operants

Merged Lisa Maria Paul requested to merge lp130998/rpn_collab:master into master
1 file
+ 11
5
Compare changes
  • Side-by-side
  • Inline
+ 11
5
@@ -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") );
}
Loading