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

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

Issue 10377102: Added simplest device mount implementation (includes NullDevice and RandomDevice) (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src/
Patch Set: Created 8 years, 7 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/SimpleTest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
5 */
6
7 #include "../dev/DevMount.h"
8 #include "gtest/gtest.h"
9
10 TEST(DevMountTest, Sanity) {
11 DevMount* bm = new DevMount();
12
13 // just make sure all of the calls run
14 struct stat st;
15 struct dirent dir;
16 EXPECT_EQ(bm->GetNode("/", &st), 0);
17 EXPECT_EQ(0, bm->Stat(1, &st));
18 EXPECT_EQ(1, S_ISDIR(st.st_mode));
19 EXPECT_GT(bm->Getdents(1, 0, &dir, 1024), 1);
20 bm->GetNode("/null", &st);
21 int node = st.st_ino;
22 char buf[10];
23 EXPECT_EQ(5, bm->Write(node, 0, reinterpret_cast<void*>(buf), 5));
24 EXPECT_EQ(0, bm->Isatty(0));
25 }
26
OLDNEW
« no previous file with comments | « libraries/nacl-mounts/test.nacl/SimpleTest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698