Skip to content
Snippets Groups Projects
Commit fc4bab29 authored by Niklas Hannekotte's avatar Niklas Hannekotte
Browse files

Merge branch 'master' into 'master'

Stack underflow exception test

See merge request !18
parents 2cf4381a 0bd1d9a9
No related branches found
No related tags found
1 merge request!18Stack underflow exception test
......@@ -51,17 +51,15 @@ TEST_CASE( "Basic power function test", "[calc]") {
REQUIRE( evaluate("25^") == 32 );
}
TEST_CASE( "Parameters are misaligned and excpetion is thrown", "[calc]") {
TEST_CASE( "Stack underflow exception test", "[calc]") {
// REQUIRE_THROWS( evaluate("40*/") );
// REQUIRE_THROWS( evaluate("14--") );
// REQUIRE_THROWS( evaluate("1+1") );
// REQUIRE_THROWS( evaluate("+11") );
// REQUIRE_THROWS( evaluate("11+3-+4") );
// REQUIRE_THROWS( evaluate("11/3*+4") );
}
TEST_CASE( "Two Operants in a row are detected and exception is thrown", "[calc]") {
//REQUIRE_THROWS( evaluate("11+3-+4") );
//REQUIRE_THROWS( evaluate("11/3*+4") );
}
TEST_CASE( "Unrecognized characters are detected and exception is thrown", "[calc]") {
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