Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
abeaucha committed Oct 3, 2024
1 parent 9391336 commit 9f5579d
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions six/modules/c++/six.sidd/unittests/test_valid_sixsidd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,22 @@ TEST_CASE(test_read_sidd300_v13_xml)
test_read_sidd_xml(testName, "sidd300_ISM-v13.xml");
}

// Set SIX_PROFILE_PARSING=N when running the test to profile the tests by re-running N-times
#define PROFILE(X) six::testing::EnvProfiler("SIX_PROFILE_PARSING", testName, std::cerr)([&](){X;});
// Set SIX_PROFILE_PARSING=N when running the test to profile the tests by
// re-running N-times
#define PROFILE(X) \
six::testing::EnvProfiler("SIX_PROFILE_PARSING", testName, std::cerr)( \
[&]() { X; });

// Set SIX_PROFILE_STACKSIZE=1 when running to log the size of the stacktrace
#define SSPROFILE(X, Y) TEST_SPECIFIC_EXCEPTION( \
six::testing::StackTraceSizeEnvProfiler<Y>( \
"SIX_PROFILE_STACKSIZE", testName, std::cerr)([&](){X;}), Y)
#define SSPROFILE(X, Y) \
TEST_SPECIFIC_EXCEPTION(six::testing::StackTraceSizeEnvProfiler<Y>( \
"SIX_PROFILE_STACKSIZE", \
testName, \
std::cerr)([&]() { X; }), \
Y)

#define TEST_BAD_XML(X) PROFILE(SSPROFILE(X, six::DESValidationException));


TEST_CASE(test_read_sidd100_bad_xml)
{
const auto schemaPaths = getSchemaPaths();
Expand All @@ -230,18 +235,18 @@ TEST_CASE(test_read_sidd300_bad_xml)
TEST_CASE(test_read_sidd300_v13_bad_xml)
{
const auto schemaPaths = getSchemaPaths();
TEST_BAD_XML(test_read_sidd_xml(testName, "sidd300_ISM-v13-bad.xml", &schemaPaths));
}

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_sidd100_bad_xml);
TEST_CHECK(test_read_sidd200_bad_xml);
TEST_CHECK(test_read_sidd300_bad_xml);
TEST_CHECK(test_read_sidd300_v13_bad_xml);
)
TEST_BAD_XML(test_read_sidd_xml(testName,
"sidd300_ISM-v13-bad.xml",
&schemaPaths));
}

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_sidd100_bad_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 9f5579d

Please sign in to comment.