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

Side by Side Diff: net/base/big_endian_unittest.cc

Issue 14223008: net: Update the include paths of base/string_piece.h to its new location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « net/base/big_endian.cc ('k') | net/base/dns_util.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/string_piece.h" 5 #include "base/strings/string_piece.h"
6 #include "net/base/big_endian.h" 6 #include "net/base/big_endian.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace net { 9 namespace net {
10 10
11 TEST(BigEndianReaderTest, ReadsValues) { 11 TEST(BigEndianReaderTest, ReadsValues) {
12 char data[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA, 0xB, 0xC }; 12 char data[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xA, 0xB, 0xC };
13 char buf[2]; 13 char buf[2];
14 uint8 u8; 14 uint8 u8;
15 uint16 u16; 15 uint16 u16;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 EXPECT_FALSE(writer.WriteU16(u16)); 91 EXPECT_FALSE(writer.WriteU16(u16));
92 EXPECT_FALSE(writer.WriteBytes(buf, 2)); 92 EXPECT_FALSE(writer.WriteBytes(buf, 2));
93 EXPECT_TRUE(writer.Skip(1)); 93 EXPECT_TRUE(writer.Skip(1));
94 // 0 left 94 // 0 left
95 EXPECT_FALSE(writer.WriteU8(u8)); 95 EXPECT_FALSE(writer.WriteU8(u8));
96 EXPECT_EQ(0, writer.remaining()); 96 EXPECT_EQ(0, writer.remaining());
97 } 97 }
98 98
99 } // namespace net 99 } // namespace net
100 100
OLDNEW
« no previous file with comments | « net/base/big_endian.cc ('k') | net/base/dns_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698