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

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

Issue 10825189: [NaCl SDK] Get nacl_mounts_tests building. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows fixes Created 8 years, 4 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
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 <unistd.h>
8 #include "nacl_mounts/kernel_proxy.h" 7 #include "nacl_mounts/kernel_proxy.h"
9 #include "nacl_mounts/path.h" 8 #include "nacl_mounts/path.h"
10 9
11 #define __STDC__ 1
12 #include "gtest/gtest.h" 10 #include "gtest/gtest.h"
13 11
14 TEST(PathTest, SanityChecks) { 12 TEST(PathTest, SanityChecks) {
15 // can we construct and delete? 13 // can we construct and delete?
16 Path ph1("."); 14 Path ph1(".");
17 Path *ph2 = new Path("."); 15 Path *ph2 = new Path(".");
18 delete ph2; 16 delete ph2;
19 17
20 Path p1("."); 18 Path p1(".");
21 EXPECT_EQ(false, p1.IsAbsolute()); 19 EXPECT_EQ(false, p1.IsAbsolute());
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 EXPECT_EQ(".", test.Join()); 235 EXPECT_EQ(".", test.Join());
238 236
239 test = relative; 237 test = relative;
240 test.Append("../../.."); 238 test.Append("../../..");
241 EXPECT_EQ("..", test.Join()); 239 EXPECT_EQ("..", test.Join());
242 240
243 test = relative; 241 test = relative;
244 test.Append("../../../foo"); 242 test.Append("../../../foo");
245 EXPECT_EQ("../foo", test.Join()); 243 EXPECT_EQ("../foo", test.Join());
246 } 244 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698