core: move NFD_VERSION{,_BUILD}_STRING to version.cpp
Change-Id: I97c23de24d8a176bb83a8f481f4880ff49ea710d
diff --git a/tests/core/version.t.cpp b/tests/core/version.t.cpp
index 27e3799..2675c0e 100644
--- a/tests/core/version.t.cpp
+++ b/tests/core/version.t.cpp
@@ -45,7 +45,8 @@
BOOST_AUTO_TEST_CASE(VersionString)
{
- BOOST_TEST_MESSAGE("NFD_VERSION_STRING = " NFD_VERSION_STRING);
+ BOOST_TEST_MESSAGE("NFD_VERSION_STRING = " << NFD_VERSION_STRING);
+ BOOST_TEST_MESSAGE("NFD_VERSION_BUILD_STRING = " << NFD_VERSION_BUILD_STRING);
static_assert(NFD_VERSION_MAJOR < 1000, "");
static_assert(NFD_VERSION_MINOR < 1000, "");
@@ -54,6 +55,9 @@
::snprintf(buf, sizeof(buf), "%d.%d.%d", NFD_VERSION_MAJOR, NFD_VERSION_MINOR, NFD_VERSION_PATCH);
BOOST_CHECK_EQUAL(NFD_VERSION_STRING, buf);
+
+ std::string build(NFD_VERSION_BUILD_STRING);
+ BOOST_CHECK_EQUAL(build.substr(0, build.find_first_of('-')), NFD_VERSION_STRING);
}
BOOST_AUTO_TEST_SUITE_END() // TestVersion