| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 #include <nacl-mounts/base/KernelProxy.h> | |
| 7 #include "gtest/gtest.h" | 6 #include "gtest/gtest.h" |
| 8 #include <sys/types.h> | 7 #include <sys/types.h> |
| 9 #include <sys/stat.h> | 8 #include <sys/stat.h> |
| 10 #include <unistd.h> | 9 #include <unistd.h> |
| 11 | 10 |
| 12 TEST(SimpleTest, Simple) { | 11 TEST(SimpleTest, Simple) { |
| 13 struct stat buf; | 12 struct stat buf; |
| 14 EXPECT_EQ(0, stat("/", &buf)); | 13 EXPECT_EQ(0, stat("/", &buf)); |
| 15 EXPECT_EQ(1, S_ISDIR(buf.st_mode)); | 14 EXPECT_EQ(1, S_ISDIR(buf.st_mode)); |
| 16 EXPECT_EQ(0, stat("/dev", &buf)); | 15 EXPECT_EQ(0, stat("/dev", &buf)); |
| 17 EXPECT_EQ(1, S_ISDIR(buf.st_mode)); | 16 EXPECT_EQ(1, S_ISDIR(buf.st_mode)); |
| 18 EXPECT_EQ(0, stat("/dev/fd", &buf)); | 17 EXPECT_EQ(0, stat("/dev/fd", &buf)); |
| 19 EXPECT_EQ(1, S_ISDIR(buf.st_mode)); | 18 EXPECT_EQ(1, S_ISDIR(buf.st_mode)); |
| 20 | 19 |
| 21 EXPECT_EQ(-1, stat("/dummy", &buf)); | 20 EXPECT_EQ(-1, stat("/dummy", &buf)); |
| 22 } | 21 } |
| OLD | NEW |