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

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

Issue 10392070: Socket subsystem implementation (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
« no previous file with comments | « libraries/nacl-mounts/test.nacl/Makefile ('k') | libraries/nacl-mounts/util/PthreadHelpers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "../base/KernelProxy.h" 6 #include "base/KernelProxy.h"
7 #include "gtest/gtest.h" 7 #include "gtest/gtest.h"
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #include <unistd.h> 10 #include <unistd.h>
11 11
12 12
13 TEST(SimpleTest, Simple) { 13 TEST(SimpleTest, Simple) {
14 struct stat buf; 14 struct stat buf;
15 EXPECT_EQ(0, stat("/", &buf)); 15 EXPECT_EQ(0, stat("/", &buf));
16 EXPECT_EQ(1, S_ISDIR(buf.st_mode)); 16 EXPECT_EQ(1, S_ISDIR(buf.st_mode));
17 EXPECT_EQ(0, stat("/dev", &buf)); 17 EXPECT_EQ(0, stat("/dev", &buf));
18 EXPECT_EQ(1, S_ISDIR(buf.st_mode)); 18 EXPECT_EQ(1, S_ISDIR(buf.st_mode));
19 EXPECT_EQ(0, stat("/dev/fd", &buf)); 19 EXPECT_EQ(0, stat("/dev/fd", &buf));
20 EXPECT_EQ(1, S_ISDIR(buf.st_mode)); 20 EXPECT_EQ(1, S_ISDIR(buf.st_mode));
21 21
22 EXPECT_EQ(-1, stat("/dummy", &buf)); 22 EXPECT_EQ(-1, stat("/dummy", &buf));
23 } 23 }
OLDNEW
« no previous file with comments | « libraries/nacl-mounts/test.nacl/Makefile ('k') | libraries/nacl-mounts/util/PthreadHelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698