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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « native_client_sdk/src/libraries/nacl_mounts/pepper_interface.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_mounts_test/path_test.cc
diff --git a/native_client_sdk/src/libraries/nacl_mounts_test/path_test.cc b/native_client_sdk/src/libraries/nacl_mounts_test/path_test.cc
index 679c3a1503579035a16a9b19eca6e9adcc62c2e9..ea89d42d68522ee8349ed999bcd74e9ff9957dd9 100644
--- a/native_client_sdk/src/libraries/nacl_mounts_test/path_test.cc
+++ b/native_client_sdk/src/libraries/nacl_mounts_test/path_test.cc
@@ -242,3 +242,17 @@ TEST(PathTest, Invalid) {
test.Append("../../../foo");
EXPECT_EQ("../foo", test.Join());
}
+
+TEST(PathTest, Range) {
+ Path p("/an/absolute/path");
+
+ // p's parts should be ["/", "an", "absolute", "path"].
+ EXPECT_EQ("/an/absolute/path", p.Range(0, 4));
+ EXPECT_EQ("an/absolute/path", p.Range(1, 4));
+ EXPECT_EQ("absolute/path", p.Range(2, 4));
+ EXPECT_EQ("path", p.Range(3, 4));
+
+ EXPECT_EQ("/an/absolute", p.Range(0, 3));
+ EXPECT_EQ("an/absolute", p.Range(1, 3));
+ EXPECT_EQ("absolute", p.Range(2, 3));
+}
« 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