mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-26 18:51:04 +08:00
test: ensure the version numbers agree
This commit is contained in:
parent
72db276986
commit
c60ebf787a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user