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

Unified Diff: base/strings/string_piece_unittest.cc

Issue 2579473002: [wip] Add LiteralStringPiece which templatizes based on character length (Closed)
Patch Set: add some usage Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/strings/string_piece.h ('k') | extensions/browser/api/web_request/web_request_permissions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_piece_unittest.cc
diff --git a/base/strings/string_piece_unittest.cc b/base/strings/string_piece_unittest.cc
index f05aa152b508be69b9f1e035371d4080f448f924..3e40178827b9a4e3a9ac43390931e0829fdb6dfb 100644
--- a/base/strings/string_piece_unittest.cc
+++ b/base/strings/string_piece_unittest.cc
@@ -688,4 +688,11 @@ TYPED_TEST(CommonStringPieceTest, CheckConstructors) {
ASSERT_TRUE(empty == BasicStringPiece<TypeParam>(empty.begin(), empty.end()));
}
+TEST(CommonStringPieceTest, LiteralStringPiece) {
+ StringPiece test_piece("test");
+ EXPECT_EQ(test_piece, LiteralStringPiece("test"));
+ const char test_ptr[] = "test";
+ EXPECT_EQ(test_piece, LiteralStringPiece(test_ptr));
+}
+
} // namespace base
« no previous file with comments | « base/strings/string_piece.h ('k') | extensions/browser/api/web_request/web_request_permissions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698