Permalink
Browse files

TESTS: Fix warnings

  • Loading branch information...
1 parent 9d38934 commit c919c9996c6f62cf4f0d1a22d0522b0ee9a0514c @wjp wjp committed Jan 5, 2017
Showing with 15 additions and 15 deletions.
  1. +15 −15 test/common/str.h
View
@@ -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() {

0 comments on commit c919c99

Please sign in to comment.