Skip to content

Commit

Permalink
Merge pull request #963 from leapmotion/test-bad-config-field
Browse files Browse the repository at this point in the history
Test bad config field
  • Loading branch information
codemercenary committed Jul 7, 2016
2 parents efe3c1d + 5f997cf commit 622d941
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/autowiring/test/AutoConfigTest.cpp
Expand Up @@ -84,6 +84,13 @@ TEST_F(AutoConfigTest, ConfigFieldAssign) {
ASSERT_TRUE(x.is_dirty()) << "Config values are assumed to be initially dirty";
}

TEST_F(AutoConfigTest, ConfigFieldSetBad) {
MyConfigurableClass c;

std::string expected{ "There is no config" };
ASSERT_ANY_THROW(autowiring::ConfigSet("z", c, expected.c_str())) << "Tried to set an invalid config key and did not fail.";
}

TEST_F(AutoConfigTest, String) {
MyConfigurableClass c;

Expand Down

0 comments on commit 622d941

Please sign in to comment.