Adding comment test
This commit is contained in:
@@ -131,4 +131,23 @@ BOOST_AUTO_TEST_CASE(add_set_pattern)
|
||||
EN_deleteproject(&ph);
|
||||
}
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE(test_pattern_comments, FixtureOpenClose)
|
||||
{
|
||||
int index;
|
||||
char comment[EN_MAXMSG + 1];
|
||||
|
||||
// Set pattern comment
|
||||
error = EN_getpatternindex(ph, (char *)"1", &index);
|
||||
BOOST_REQUIRE(error == 0);
|
||||
error = EN_setcomment(ph, EN_TIMEPAT, index, (char *)"Time Pattern 1");
|
||||
BOOST_REQUIRE(error == 0);
|
||||
|
||||
// Check pattern comment
|
||||
error = EN_getpatternindex(ph, (char *)"1", &index);
|
||||
BOOST_REQUIRE(error == 0);
|
||||
error = EN_getcomment(ph, EN_TIMEPAT, index, comment);
|
||||
BOOST_REQUIRE(error == 0);
|
||||
BOOST_CHECK(check_string(comment, (char *)"Time Pattern 1"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
Reference in New Issue
Block a user