From d04f2cf96241948a062e68bbcf346e990a0f2b76 Mon Sep 17 00:00:00 2001 From: def Date: Sat, 7 Nov 2020 11:14:58 +0100 Subject: [PATCH] blocklist_driver unit test: also check gl version --- src/test/blocklist_driver.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/test/blocklist_driver.cpp b/src/test/blocklist_driver.cpp index 13d2ecbac..aa0cb926b 100644 --- a/src/test/blocklist_driver.cpp +++ b/src/test/blocklist_driver.cpp @@ -2,12 +2,31 @@ #include -TEST(BlocklistDriver, Valid) +TEST(BlocklistDriver, Valid1) { - int Major, Minor, Patch; + int Major = -1, Minor = -1, Patch = -1; EXPECT_STREQ(ParseBlocklistDriverVersions("Intel", "Build 26.20.100.7810", Major, Minor, Patch), "This Intel driver version can cause crashes, please update it to a newer version."); + EXPECT_EQ(Major, 2); + EXPECT_EQ(Minor, 0); + EXPECT_EQ(Patch, 0); +} + +TEST(BlocklistDriver, Valid2) +{ + int Major = -1, Minor = -1, Patch = -1; EXPECT_STREQ(ParseBlocklistDriverVersions("Intel", "Build 26.20.100.7926", Major, Minor, Patch), "This Intel driver version can cause crashes, please update it to a newer version."); + EXPECT_EQ(Major, 2); + EXPECT_EQ(Minor, 0); + EXPECT_EQ(Patch, 0); +} + +TEST(BlocklistDriver, Valid3) +{ + int Major = -1, Minor = -1, Patch = -1; EXPECT_STREQ(ParseBlocklistDriverVersions("Intel", "Build 26.20.100.7985", Major, Minor, Patch), "This Intel driver version can cause crashes, please update it to a newer version."); + EXPECT_EQ(Major, 2); + EXPECT_EQ(Minor, 0); + EXPECT_EQ(Patch, 0); } TEST(BlocklistDriver, Invalid)