Commit e65d5d0f authored by Kenton Varda's avatar Kenton Varda

Fix version test.

parent d68eaf1b
......@@ -37,9 +37,12 @@ TEST(Common, Version) {
#ifdef VERSION
auto expectedVersion =
kj::str(CAPNP_VERSION_MAJOR, '.', CAPNP_VERSION_MINOR, '.', CAPNP_VERSION_MICRO);
auto devVersion =
kj::str(CAPNP_VERSION_MAJOR, '.', CAPNP_VERSION_MINOR, "-dev");
kj::StringPtr actualVersion = VERSION;
KJ_ASSERT(actualVersion == expectedVersion ||
actualVersion.startsWith(kj::str(expectedVersion, '-')),
actualVersion.startsWith(kj::str(expectedVersion, '-')) ||
(actualVersion == devVersion && CAPNP_VERSION_MICRO == 0),
expectedVersion, actualVersion);
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment