diff --git a/src/Magnum/Vk/Test/VersionTest.cpp b/src/Magnum/Vk/Test/VersionTest.cpp index 91af9026f..dd7d8ebef 100644 --- a/src/Magnum/Vk/Test/VersionTest.cpp +++ b/src/Magnum/Vk/Test/VersionTest.cpp @@ -37,6 +37,7 @@ struct VersionTest: TestSuite::Tester { explicit VersionTest(); void packing(); + void packingMagnumVersion(); void comparison(); void debug(); @@ -44,6 +45,7 @@ struct VersionTest: TestSuite::Tester { VersionTest::VersionTest() { addTests({&VersionTest::packing, + &VersionTest::packingMagnumVersion, &VersionTest::comparison, &VersionTest::debug}); @@ -70,6 +72,16 @@ void VersionTest::packing() { #endif } +void VersionTest::packingMagnumVersion() { + Version a = version(2019, 10, 1506); + { + CORRADE_EXPECT_FAIL("Vulkan version encoding can't fit full years."); + CORRADE_COMPARE(versionMajor(a), 2019); + } + CORRADE_COMPARE(versionMinor(a), 10); + CORRADE_COMPARE(versionPatch(a), 1506); +} + void VersionTest::comparison() { CORRADE_VERIFY(!(version(1, 5, 3) < version(1, 5, 3))); CORRADE_VERIFY(!(version(1, 5, 3) > version(1, 5, 3)));