OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |