Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(357)

Side by Side Diff: base/strings/string_piece_unittest.cc

Issue 185423006: Eliminate build warnings in base/ for Android x64 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/os_compat_android.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 } 667 }
668 668
669 TYPED_TEST(CommonStringPieceTest, CheckConstructors) { 669 TYPED_TEST(CommonStringPieceTest, CheckConstructors) {
670 TypeParam str(TestFixture::as_string("hello world")); 670 TypeParam str(TestFixture::as_string("hello world"));
671 TypeParam empty; 671 TypeParam empty;
672 672
673 ASSERT_TRUE(str == BasicStringPiece<TypeParam>(str)); 673 ASSERT_TRUE(str == BasicStringPiece<TypeParam>(str));
674 ASSERT_TRUE(str == BasicStringPiece<TypeParam>(str.c_str())); 674 ASSERT_TRUE(str == BasicStringPiece<TypeParam>(str.c_str()));
675 ASSERT_TRUE(TestFixture::as_string("hello") == 675 ASSERT_TRUE(TestFixture::as_string("hello") ==
676 BasicStringPiece<TypeParam>(str.c_str(), 5)); 676 BasicStringPiece<TypeParam>(str.c_str(), 5));
677 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(str.c_str(), 0U)); 677 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(str.c_str(),
678 static_cast<typename BasicStringPiece<TypeParam>::size_type>(0)));
678 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(NULL)); 679 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(NULL));
679 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(NULL, 0U)); 680 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(NULL,
681 static_cast<typename BasicStringPiece<TypeParam>::size_type>(0)));
680 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>()); 682 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>());
681 ASSERT_TRUE(str == BasicStringPiece<TypeParam>(str.begin(), str.end())); 683 ASSERT_TRUE(str == BasicStringPiece<TypeParam>(str.begin(), str.end()));
682 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(str.begin(), str.begin())); 684 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(str.begin(), str.begin()));
683 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(empty)); 685 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(empty));
684 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(empty.begin(), empty.end())); 686 ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(empty.begin(), empty.end()));
685 } 687 }
686 688
687 } // namespace base 689 } // namespace base
OLDNEW
« no previous file with comments | « base/os_compat_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698