From 18da9c2a5fe2f573bf2b3e0d7ec248a74779d1a6 Mon Sep 17 00:00:00 2001 From: Lisa <you@example.com> Date: Sat, 18 Jan 2020 15:27:12 +0100 Subject: [PATCH] unrecognized chars test added --- test/test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test.cpp b/test/test.cpp index e47725c..b654dcb 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -56,3 +56,7 @@ TEST_CASE( "Two Operants in a row", "[calc]") { //REQUIRE_THROWS( evaluate("11/3*+4") ); } +TEST_CASE( "Unrecognized characters", "[calc]") { + REQUIRE_THROWS( evaluate("11+3?4") ); + REQUIRE_THROWS( evaluate("1F+") ); +} -- GitLab