Adding element id validity check

Adding checks for element set id functions
This commit is contained in:
Michael Tryby
2019-04-16 17:29:32 -04:00
parent 22a7993c8c
commit 3186ec326c
5 changed files with 41 additions and 7 deletions

View File

@@ -147,8 +147,10 @@ BOOST_FIXTURE_TEST_CASE(test_pattern_comments, FixtureOpenClose)
BOOST_CHECK(check_string(comment, (char *)"Time Pattern 1"));
}
BOOST_FIXTURE_TEST_CASE(test_pat_isvalid_id, FixtureInitClose)
BOOST_FIXTURE_TEST_CASE(test_pat_id_isvalid, FixtureInitClose)
{
int index;
error = EN_addpattern(ph, "P1");
BOOST_REQUIRE(error == 0);
@@ -160,6 +162,11 @@ BOOST_FIXTURE_TEST_CASE(test_pat_isvalid_id, FixtureInitClose)
error = EN_addpattern(ph, "P;2");
BOOST_REQUIRE(error == 250);
EN_getpatternindex(ph, "P1", &index);
error = EN_setpatternid(ph, index, "P;1");
BOOST_REQUIRE(error == 250);
}