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

Side by Side Diff: mojo/services/files/c/tests/mojio_unistd_unittest.cc

Issue 1388413005: Move //mojo/services/X/public/... to //mojo/services/X/... (part 1). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 // Basic tests of things declared in mojio_unistd.h, as well as 5 // Basic tests of things declared in mojio_unistd.h, as well as
6 // |mojio_creat()|/|mojio_open()| from mojio_fcntl.h. Note that more thorough 6 // |mojio_creat()|/|mojio_open()| from mojio_fcntl.h. Note that more thorough
7 // tests are done more directly at a different level. 7 // tests are done more directly at a different level.
8 8
9 #include <errno.h> 9 #include <errno.h>
10 #include <string.h> 10 #include <string.h>
11 11
12 #include "files/public/c/mojio_fcntl.h" 12 #include "files/c/mojio_fcntl.h"
13 #include "files/public/c/mojio_sys_stat.h" 13 #include "files/c/mojio_sys_stat.h"
14 #include "files/public/c/mojio_unistd.h" 14 #include "files/c/mojio_unistd.h"
15 #include "files/public/c/tests/mojio_test_base.h" 15 #include "files/c/tests/mojio_test_base.h"
16 16
17 namespace { 17 namespace {
18 18
19 using MojioUnistdTest = mojio::test::MojioTestBase; 19 using MojioUnistdTest = mojio::test::MojioTestBase;
20 20
21 TEST_F(MojioUnistdTest, CreatWriteOpenCloseReadClose) { 21 TEST_F(MojioUnistdTest, CreatWriteOpenCloseReadClose) {
22 const char kTestFileName[] = "test_file"; 22 const char kTestFileName[] = "test_file";
23 const char kTestData[] = "Hello mojio!"; 23 const char kTestData[] = "Hello mojio!";
24 24
25 errno = 12345; 25 errno = 12345;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 errno = 12345; 131 errno = 12345;
132 size = mojio_write(-1, buf, sizeof(buf)); 132 size = mojio_write(-1, buf, sizeof(buf));
133 errno_value = errno; 133 errno_value = errno;
134 EXPECT_EQ(-1, size); 134 EXPECT_EQ(-1, size);
135 EXPECT_EQ(EBADF, errno_value); 135 EXPECT_EQ(EBADF, errno_value);
136 } 136 }
137 137
138 // TODO(vtl): mojio_chdir(), mojio_dup(). 138 // TODO(vtl): mojio_chdir(), mojio_dup().
139 139
140 } // namespace 140 } // namespace
OLDNEW
« no previous file with comments | « mojo/services/files/c/tests/mojio_test_base.cc ('k') | mojo/services/files/c/tests/real_errno_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698