MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / TEST

Function TEST

unitTests/test_enforce.cpp:10–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#include <stdexcept>
9
10TEST(enforce, errMessageCanBeRetrievedFromErrorException) {
11 try {
12 Exiv2::Internal::enforce(false, Exiv2::ErrorCode::kerErrorMessage, "an error occurred");
13 } catch (const Exiv2::Error& e) {
14 ASSERT_STREQ(e.what(), "an error occurred");
15 }
16}
17
18TEST(enforce, withTrueConditionDoesNotThrow) {
19 ASSERT_NO_THROW(Exiv2::Internal::enforce(true, Exiv2::ErrorCode::kerErrorMessage));

Callers

nothing calls this directly

Calls 2

enforceFunction · 0.85
whatMethod · 0.80

Tested by

no test coverage detected