Skip to content
Snippets Groups Projects
Commit e38d6166 authored by Steven Waleska's avatar Steven Waleska
Browse files

input test

parent 65b9e9a5
No related branches found
No related tags found
2 merge requests!23input test,!22input test
......@@ -65,3 +65,13 @@ TEST_CASE( "Unrecognized characters are detected and exception is thrown", "[cal
REQUIRE_THROWS_AS( evaluate("11+3?4"), std::invalid_argument );
REQUIRE_THROWS_AS( evaluate("1F+"), std::invalid_argument );
}
TEST_CASE("Exceptions is thrown if input contains only operands", "[calc]") {
REQUIRE_THROWS(evaluate("+"));
REQUIRE_THROWS(evaluate("-"));
REQUIRE_THROWS(evaluate("*"));
REQUIRE_THROWS(evaluate("/"));
REQUIRE_THROWS(evaluate("+++"));
REQUIRE_THROWS(evaluate("+----"));
REQUIRE_THROWS(evaluate("*-*-///"));
}
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