aboutsummaryrefslogtreecommitdiff
path: root/test/common
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2017-01-05 22:06:25 +0100
committerWillem Jan Palenstijn2017-01-05 22:07:24 +0100
commitc919c9996c6f62cf4f0d1a22d0522b0ee9a0514c (patch)
tree3ae15eb6532c745dc8f88970a46c3d7d6af62812 /test/common
parent9d3893459f34b6ada2dad2d9d27216c774a7c4bd (diff)
downloadscummvm-rg350-c919c9996c6f62cf4f0d1a22d0522b0ee9a0514c.tar.gz
scummvm-rg350-c919c9996c6f62cf4f0d1a22d0522b0ee9a0514c.tar.bz2
scummvm-rg350-c919c9996c6f62cf4f0d1a22d0522b0ee9a0514c.zip
TESTS: Fix warnings
Diffstat (limited to 'test/common')
-rw-r--r--test/common/str.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/common/str.h b/test/common/str.h
index b6080fe3be..b7ad28e56e 100644
--- a/test/common/str.h
+++ b/test/common/str.h
@@ -405,25 +405,25 @@ class StringTestSuite : public CxxTest::TestSuite
void test_strnlen() {
static const char * const testString = "123";
- TS_ASSERT_EQUALS(Common::strnlen(testString, 0), 0);
- TS_ASSERT_EQUALS(Common::strnlen(testString, 1), 1);
- TS_ASSERT_EQUALS(Common::strnlen(testString, 2), 2);
- TS_ASSERT_EQUALS(Common::strnlen(testString, 3), 3);
- TS_ASSERT_EQUALS(Common::strnlen(testString, 4), 3);
+ TS_ASSERT_EQUALS(Common::strnlen(testString, 0), 0u);
+ TS_ASSERT_EQUALS(Common::strnlen(testString, 1), 1u);
+ TS_ASSERT_EQUALS(Common::strnlen(testString, 2), 2u);
+ TS_ASSERT_EQUALS(Common::strnlen(testString, 3), 3u);
+ TS_ASSERT_EQUALS(Common::strnlen(testString, 4), 3u);
const char testArray[4] = { '1', '2', '3', '4' };
- TS_ASSERT_EQUALS(Common::strnlen(testArray, 0), 0);
- TS_ASSERT_EQUALS(Common::strnlen(testArray, 1), 1);
- TS_ASSERT_EQUALS(Common::strnlen(testArray, 2), 2);
- TS_ASSERT_EQUALS(Common::strnlen(testArray, 3), 3);
- TS_ASSERT_EQUALS(Common::strnlen(testArray, 4), 4);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray, 0), 0u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray, 1), 1u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray, 2), 2u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray, 3), 3u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray, 4), 4u);
const char testArray2[4] = { '1', '\0', '3', '4' };
- TS_ASSERT_EQUALS(Common::strnlen(testArray2, 0), 0);
- TS_ASSERT_EQUALS(Common::strnlen(testArray2, 1), 1);
- TS_ASSERT_EQUALS(Common::strnlen(testArray2, 2), 1);
- TS_ASSERT_EQUALS(Common::strnlen(testArray2, 3), 1);
- TS_ASSERT_EQUALS(Common::strnlen(testArray2, 4), 1);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray2, 0), 0u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray2, 1), 1u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray2, 2), 1u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray2, 3), 1u);
+ TS_ASSERT_EQUALS(Common::strnlen(testArray2, 4), 1u);
}
void test_scumm_stricmp() {