test: ensure the version numbers agree

master
Ben Boeckel 2020-10-01 12:22:04 -04:00 committed by Christopher Dunn
parent 72db276986
commit c60ebf787a
1 changed files with 10 additions and 0 deletions

View File

@ -3916,6 +3916,16 @@ JSONTEST_FIXTURE_LOCAL(MemberTemplateIs, BehavesSameAsNamedIs) {
}
}
class VersionTest : public JsonTest::TestCase {};
JSONTEST_FIXTURE_LOCAL(VersionTest, VersionNumbersMatch) {
std::ostringstream vstr;
vstr << JSONCPP_VERSION_MAJOR << '.'
<< JSONCPP_VERSION_MINOR << '.'
<< JSONCPP_VERSION_PATCH;
JSONTEST_ASSERT_EQUAL(vstr.str(), std::string(JSONCPP_VERSION_STRING));
}
#if defined(__GNUC__)
#pragma GCC diagnostic pop
#endif