diff options
author | maf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-06 04:09:16 +0000 |
---|---|---|
committer | maf@google.com <maf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-06 04:09:16 +0000 |
commit | 09175df729ebf3ee0cf79bb01577744674dd24c2 (patch) | |
tree | aea23c43be67ba51a67918d3f4c4762402831adc /o3d/utils/cross | |
parent | 6e713f08e972d4b7cf730c83a53345a4b53e1262 (diff) | |
download | chromium_src-09175df729ebf3ee0cf79bb01577744674dd24c2.zip chromium_src-09175df729ebf3ee0cf79bb01577744674dd24c2.tar.gz chromium_src-09175df729ebf3ee0cf79bb01577744674dd24c2.tar.bz2 |
Lots of changes required to build on GCC in full paranoia mode with no warnings generated.
Review URL: http://codereview.chromium.org/165013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/utils/cross')
-rw-r--r-- | o3d/utils/cross/file_path_utils_test.cc | 4 | ||||
-rw-r--r-- | o3d/utils/cross/file_text_reader_test.cc | 38 | ||||
-rw-r--r-- | o3d/utils/cross/string_reader_test.cc | 16 |
3 files changed, 29 insertions, 29 deletions
diff --git a/o3d/utils/cross/file_path_utils_test.cc b/o3d/utils/cross/file_path_utils_test.cc index ce96165..ac4d777 100644 --- a/o3d/utils/cross/file_path_utils_test.cc +++ b/o3d/utils/cross/file_path_utils_test.cc @@ -96,7 +96,7 @@ TEST_F(FilePathUtilsTest, AbsolutePathBasic) { FilePath test_path(FILE_PATH_LITERAL("this/is/a/path")); #endif FilePath abs_path = test_path; - bool result = AbsolutePath(&abs_path); + AbsolutePath(&abs_path); FilePath expected_result = cwd; expected_result = expected_result.Append(test_path); EXPECT_STREQ(expected_result.value().c_str(), abs_path.value().c_str()); @@ -109,7 +109,7 @@ TEST_F(FilePathUtilsTest, AbsolutePathAlreadyAbsolute) { FilePath test_path(FILE_PATH_LITERAL("/this/is/a/path")); #endif FilePath abs_path = test_path; - bool result = AbsolutePath(&abs_path); + AbsolutePath(&abs_path); EXPECT_STREQ(test_path.value().c_str(), abs_path.value().c_str()); } diff --git a/o3d/utils/cross/file_text_reader_test.cc b/o3d/utils/cross/file_text_reader_test.cc index 3bf1415..9b98c63 100644 --- a/o3d/utils/cross/file_text_reader_test.cc +++ b/o3d/utils/cross/file_text_reader_test.cc @@ -46,15 +46,15 @@ struct FileInfo { }; static const FileInfo kFileInfo[] = { - "/test_file_string_one", "testing 1..2..3", - "/test_file_string_two", "4..5..6", - "/test_file_string_lf", "testing 1..2..3\n4..5..6\n", - "/test_file_string_cr", "testing 1..2..3\r4..5..6\r", - "/test_file_string_crlf", "testing 1..2..3\r\n4..5..6\r\n", - "/test_file_string_lfcr", "testing 1..2..3\n\r4..5..6\n\r", - "/test_file_string_lflf", "testing 1..2..3\n\n4..5..6\n\n", - "/test_file_string_short", "T", - "/test_file_string_empty", "", + { "/test_file_string_one", "testing 1..2..3" }, + { "/test_file_string_two", "4..5..6" }, + { "/test_file_string_lf", "testing 1..2..3\n4..5..6\n" }, + { "/test_file_string_cr", "testing 1..2..3\r4..5..6\r" }, + { "/test_file_string_crlf", "testing 1..2..3\r\n4..5..6\r\n" }, + { "/test_file_string_lfcr", "testing 1..2..3\n\r4..5..6\n\r" }, + { "/test_file_string_lflf", "testing 1..2..3\n\n4..5..6\n\n" }, + { "/test_file_string_short", "T" }, + { "/test_file_string_empty", "" } }; static const int kNumFiles = arraysize(kFileInfo); @@ -119,7 +119,7 @@ class FileTextReaderTest : public testing::Test { TEST_F(FileTextReaderTest, StartAtBeginning) { FileTextReader reader(file_pointers_[0]); - EXPECT_EQ(0, reader.position()); + EXPECT_EQ(0U, reader.position()); EXPECT_EQ(file_pointers_[0], reader.input()); EXPECT_EQ(false, reader.IsAtEnd()); } @@ -127,42 +127,42 @@ TEST_F(FileTextReaderTest, StartAtBeginning) { TEST_F(FileTextReaderTest, TestPeekString) { FileTextReader reader(file_pointers_[0]); EXPECT_EQ(test_string_one_.substr(0, 6), reader.PeekString(6)); - EXPECT_EQ(0, reader.position()); + EXPECT_EQ(0U, reader.position()); EXPECT_EQ(false, reader.IsAtEnd()); } TEST_F(FileTextReaderTest, ReadsSingleCharacter) { FileTextReader reader(file_pointers_[0]); EXPECT_EQ(test_string_one_.substr(0, 1)[0], reader.ReadChar()); - EXPECT_EQ(1, reader.position()); + EXPECT_EQ(1U, reader.position()); EXPECT_EQ(false, reader.IsAtEnd()); EXPECT_EQ(test_string_one_.substr(1, 2), reader.PeekString(2)); - EXPECT_EQ(1, reader.position()); + EXPECT_EQ(1U, reader.position()); } TEST_F(FileTextReaderTest, ReadsMultipleCharacters) { FileTextReader reader(file_pointers_[0]); EXPECT_EQ(test_string_one_.substr(0, 1)[0], reader.ReadChar()); EXPECT_EQ(test_string_one_.substr(1, 1)[0], reader.ReadChar()); - EXPECT_EQ(2, reader.position()); + EXPECT_EQ(2U, reader.position()); EXPECT_EQ(false, reader.IsAtEnd()); EXPECT_EQ(test_string_one_.substr(2, 2), reader.PeekString(2)); - EXPECT_EQ(2, reader.position()); + EXPECT_EQ(2U, reader.position()); } TEST_F(FileTextReaderTest, ReadsFile) { FileTextReader reader(file_pointers_[0]); EXPECT_EQ(test_string_one_.substr(0, 7), reader.ReadString(7)); - EXPECT_EQ(7, reader.position()); + EXPECT_EQ(7U, reader.position()); EXPECT_EQ(false, reader.IsAtEnd()); EXPECT_EQ(test_string_one_.substr(7, 2), reader.PeekString(2)); - EXPECT_EQ(7, reader.position()); + EXPECT_EQ(7U, reader.position()); } TEST_F(FileTextReaderTest, EmptyFile) { FileTextReader reader(file_pointers_[8]); EXPECT_EQ("", reader.PeekString(1)); - EXPECT_EQ(0, reader.position()); + EXPECT_EQ(0U, reader.position()); EXPECT_EQ(true, reader.IsAtEnd()); EXPECT_EQ(0, reader.ReadChar()); EXPECT_EQ(true, reader.IsAtEnd()); @@ -171,7 +171,7 @@ TEST_F(FileTextReaderTest, EmptyFile) { TEST_F(FileTextReaderTest, TinyFile) { FileTextReader reader(file_pointers_[7]); EXPECT_EQ(test_string_short_.substr(0, 1), reader.PeekString(1)); - EXPECT_EQ(0, reader.position()); + EXPECT_EQ(0U, reader.position()); EXPECT_EQ(false, reader.IsAtEnd()); EXPECT_EQ(test_string_short_[0], reader.ReadChar()); EXPECT_EQ(true, reader.IsAtEnd()); diff --git a/o3d/utils/cross/string_reader_test.cc b/o3d/utils/cross/string_reader_test.cc index f2755be..742dc56 100644 --- a/o3d/utils/cross/string_reader_test.cc +++ b/o3d/utils/cross/string_reader_test.cc @@ -73,43 +73,43 @@ class StringReaderTest : public testing::Test { TEST_F(StringReaderTest, StartAtBeginning) { StringReader reader(test_string_one_); - EXPECT_EQ(0, reader.position()); + EXPECT_EQ(0U, reader.position()); EXPECT_EQ(test_string_one_, reader.input()); } TEST_F(StringReaderTest, TestPeekString) { StringReader reader(test_string_one_); EXPECT_EQ(test_string_one_.substr(0, 6), reader.PeekString(6)); - EXPECT_EQ(0, reader.position()); + EXPECT_EQ(0U, reader.position()); EXPECT_EQ(test_string_one_, reader.input()); } TEST_F(StringReaderTest, ReadsSingleCharacter) { StringReader reader(test_string_one_); EXPECT_EQ(test_string_one_.substr(0, 1)[0], reader.ReadChar()); - EXPECT_EQ(1, reader.position()); + EXPECT_EQ(1U, reader.position()); EXPECT_EQ(false, reader.IsAtEnd()); EXPECT_EQ(test_string_one_.substr(1, 2), reader.PeekString(2)); - EXPECT_EQ(1, reader.position()); + EXPECT_EQ(1U, reader.position()); } TEST_F(StringReaderTest, ReadsMultipleCharacters) { StringReader reader(test_string_one_); EXPECT_EQ(test_string_one_.substr(0, 1)[0], reader.ReadChar()); EXPECT_EQ(test_string_one_.substr(1, 1)[0], reader.ReadChar()); - EXPECT_EQ(2, reader.position()); + EXPECT_EQ(2U, reader.position()); EXPECT_EQ(false, reader.IsAtEnd()); EXPECT_EQ(test_string_one_.substr(2, 2), reader.PeekString(2)); - EXPECT_EQ(2, reader.position()); + EXPECT_EQ(2U, reader.position()); } TEST_F(StringReaderTest, ReadsString) { StringReader reader(test_string_one_); EXPECT_EQ(test_string_one_.substr(0, 7), reader.ReadString(7)); - EXPECT_EQ(7, reader.position()); + EXPECT_EQ(7U, reader.position()); EXPECT_EQ(false, reader.IsAtEnd()); EXPECT_EQ(test_string_one_.substr(7, 2), reader.PeekString(2)); - EXPECT_EQ(7, reader.position()); + EXPECT_EQ(7U, reader.position()); } TEST_F(StringReaderTest, ReadsToEnd) { |