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

Side by Side Diff: native_client_sdk/src/libraries/nacl_mounts_test/path_test.cc

Issue 11887021: [NaCl SDK] Add HTTP mount. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 11 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 | « native_client_sdk/src/libraries/nacl_mounts/pepper_interface.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 5
6 #include <fcntl.h> 6 #include <fcntl.h>
7 #include "nacl_mounts/kernel_proxy.h" 7 #include "nacl_mounts/kernel_proxy.h"
8 #include "nacl_mounts/path.h" 8 #include "nacl_mounts/path.h"
9 9
10 #include "gtest/gtest.h" 10 #include "gtest/gtest.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 EXPECT_EQ(".", test.Join()); 235 EXPECT_EQ(".", test.Join());
236 236
237 test = relative; 237 test = relative;
238 test.Append("../../.."); 238 test.Append("../../..");
239 EXPECT_EQ("..", test.Join()); 239 EXPECT_EQ("..", test.Join());
240 240
241 test = relative; 241 test = relative;
242 test.Append("../../../foo"); 242 test.Append("../../../foo");
243 EXPECT_EQ("../foo", test.Join()); 243 EXPECT_EQ("../foo", test.Join());
244 } 244 }
245
246 TEST(PathTest, Range) {
247 Path p("/an/absolute/path");
248
249 // p's parts should be ["/", "an", "absolute", "path"].
250 EXPECT_EQ("/an/absolute/path", p.Range(0, 4));
251 EXPECT_EQ("an/absolute/path", p.Range(1, 4));
252 EXPECT_EQ("absolute/path", p.Range(2, 4));
253 EXPECT_EQ("path", p.Range(3, 4));
254
255 EXPECT_EQ("/an/absolute", p.Range(0, 3));
256 EXPECT_EQ("an/absolute", p.Range(1, 3));
257 EXPECT_EQ("absolute", p.Range(2, 3));
258 }
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_mounts/pepper_interface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698