Skip to content

Commit c60ebf7

Browse files
mathstufcdunn2001
authored andcommitted
test: ensure the version numbers agree
1 parent 72db276 commit c60ebf7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/test_lib_json/main.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -3916,6 +3916,16 @@ JSONTEST_FIXTURE_LOCAL(MemberTemplateIs, BehavesSameAsNamedIs) {
39163916
}
39173917
}
39183918

3919+
class VersionTest : public JsonTest::TestCase {};
3920+
3921+
JSONTEST_FIXTURE_LOCAL(VersionTest, VersionNumbersMatch) {
3922+
std::ostringstream vstr;
3923+
vstr << JSONCPP_VERSION_MAJOR << '.'
3924+
<< JSONCPP_VERSION_MINOR << '.'
3925+
<< JSONCPP_VERSION_PATCH;
3926+
JSONTEST_ASSERT_EQUAL(vstr.str(), std::string(JSONCPP_VERSION_STRING));
3927+
}
3928+
39193929
#if defined(__GNUC__)
39203930
#pragma GCC diagnostic pop
39213931
#endif

0 commit comments

Comments
 (0)