Skip to content

Commit

Permalink
tests for bad files
Browse files Browse the repository at this point in the history
  • Loading branch information
abeaucha committed Oct 1, 2024
1 parent f615a51 commit 0861a9b
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion six/modules/c++/six.sidd/unittests/test_valid_sixsidd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,15 @@ TEST_CASE(test_read_sidd300_v13_xml)
test_read_sidd_xml(testName, "sidd300_ISM-v13.xml");
}

TEST_CASE(test_read_sidd200_bad_xml)
{
const auto schemaPaths = getSchemaPaths();
test_read_sidd_xml(testName, "sidd200.xml");
TEST_SPECIFIC_EXCEPTION(
test_read_sidd_xml(testName, "sidd200-bad.xml", &schemaPaths),
six::DESValidationException);
}

TEST_CASE(test_read_sidd300_bad_xml)
{
const auto schemaPaths = getSchemaPaths();
Expand All @@ -206,12 +215,22 @@ TEST_CASE(test_read_sidd300_bad_xml)
six::DESValidationException);
}

TEST_CASE(test_read_sidd300_v13_bad_xml)
{
const auto schemaPaths = getSchemaPaths();
TEST_SPECIFIC_EXCEPTION(
test_read_sidd_xml(testName, "sidd300_ISM-v13-bad.xml", &schemaPaths),
six::DESValidationException);
}

TEST_MAIN(
TEST_CHECK(test_createFakeDerivedData);
TEST_CHECK(test_createFakeDerivedData_validate);
TEST_CHECK(test_read_sidd200_no_LUT);
TEST_CHECK(test_read_sidd200_xml);
TEST_CHECK(test_read_sidd300_xml);
TEST_CHECK(test_read_sidd300_v13_xml);
TEST_CHECK(test_read_pathological00_xml);
TEST_CHECK(test_read_sidd200_bad_xml);
TEST_CHECK(test_read_sidd300_bad_xml);
TEST_CHECK(test_read_sidd300_v13_bad_xml);
)

0 comments on commit 0861a9b

Please sign in to comment.