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

Side by Side Diff: libraries/nacl-mounts/test.nacl/SimpleTest.cc

Issue 10556007: changes in memory mount and socket subsystem to port thttpd (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src/
Patch Set: Created 8 years, 6 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 /* 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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698