Skip to content

Commit

Permalink
Refs #10398 Add more aggressive testing
Browse files Browse the repository at this point in the history
These invalid inputs should throw an exception.
  • Loading branch information
Harry Jeffery committed Oct 22, 2014
1 parent 5d6c99b commit 5d9ea12
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -712,6 +712,12 @@ class ReflMainViewPresenterTest : public CxxTest::TestSuite
TS_ASSERT_EQUALS(kvp["e"], "4,5,6");
TS_ASSERT_EQUALS(kvp["f"], "1+1=2");
TS_ASSERT_EQUALS(kvp["g"], "'");

TS_ASSERT_THROWS(ReflMainViewPresenter::parseKeyValueString("a = 1, b = 2, c = 3,"), std::runtime_error);
TS_ASSERT_THROWS(ReflMainViewPresenter::parseKeyValueString("a = 1, b = 2, c = 3,d"), std::runtime_error);
TS_ASSERT_THROWS(ReflMainViewPresenter::parseKeyValueString(",a = 1"), std::runtime_error);
TS_ASSERT_THROWS(ReflMainViewPresenter::parseKeyValueString(",a = 1 = 2,="), std::runtime_error);
TS_ASSERT_THROWS(ReflMainViewPresenter::parseKeyValueString("=,=,="), std::runtime_error);
}
};

Expand Down

0 comments on commit 5d9ea12

Please sign in to comment.