summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/sdlhelper.cpp1
-rw-r--r--src/utils/stringutils_unittest.cc10
2 files changed, 6 insertions, 5 deletions
diff --git a/src/utils/sdlhelper.cpp b/src/utils/sdlhelper.cpp
index da81f03ea..1511bedb1 100644
--- a/src/utils/sdlhelper.cpp
+++ b/src/utils/sdlhelper.cpp
@@ -43,6 +43,7 @@ bool SDL::getAllVideoModes(StringVect &modeList)
.append(toString(static_cast<int>(modes[0]->h)));
logger->log("support mode: " + modeString);
modeList.push_back(modeString);
+ return true;
#else
/* Check which modes are available */
if (modes == static_cast<SDL_Rect **>(nullptr))
diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc
index 06ddaefd4..a3ae69d48 100644
--- a/src/utils/stringutils_unittest.cc
+++ b/src/utils/stringutils_unittest.cc
@@ -133,23 +133,23 @@ TEST(stringuntils, compareStrI1)
{
std::string str1 = "";
std::string str2 = "";
- EXPECT_TRUE(compareStrI(str1, str2) == 0);
+ EXPECT_EQ(0, compareStrI(str1, str2));
str1 = "test";
str2 = "test";
- EXPECT_TRUE(compareStrI(str1, str2) == 0);
+ EXPECT_EQ(0, compareStrI(str1, str2));
str1 = "test";
str2 = "test1";
- EXPECT_TRUE(compareStrI(str1, str2) < 0);
+ EXPECT_GT(0, compareStrI(str1, str2));
str1 = "test";
str2 = "aest1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
- EXPECT_TRUE(compareStrI(str1, str2) > 0);
+ EXPECT_LT(0, compareStrI(str1, str2));
str1 = "testaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
str2 = "testaa";
- EXPECT_TRUE(compareStrI(str1, str2) > 0);
+ EXPECT_LT(0, compareStrI(str1, str2));
}
TEST(stringuntils, isWordSeparator1)