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

Side by Side Diff: mojo/services/files/c/tests/mojio_sys_stat_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_sys_stat.h. Note that more thorough 5 // Basic tests of things declared in mojio_sys_stat.h. Note that more thorough
6 // tests are done more directly at a different level. 6 // tests are done more directly at a different level.
7 7
8 #include <errno.h> 8 #include <errno.h>
9 #include <string.h> 9 #include <string.h>
10 10
11 #include "files/public/c/mojio_fcntl.h" 11 #include "files/c/mojio_fcntl.h"
12 #include "files/public/c/mojio_sys_stat.h" 12 #include "files/c/mojio_sys_stat.h"
13 #include "files/public/c/mojio_unistd.h" 13 #include "files/c/mojio_unistd.h"
14 #include "files/public/c/tests/mojio_test_base.h" 14 #include "files/c/tests/mojio_test_base.h"
15 15
16 namespace { 16 namespace {
17 17
18 using MojioSysStatTest = mojio::test::MojioTestBase; 18 using MojioSysStatTest = mojio::test::MojioTestBase;
19 19
20 TEST_F(MojioSysStatTest, Fstat) { 20 TEST_F(MojioSysStatTest, Fstat) {
21 const char kTestData[511] = {}; 21 const char kTestData[511] = {};
22 22
23 int fd = mojio_creat("my_file", MOJIO_S_IRWXU); 23 int fd = mojio_creat("my_file", MOJIO_S_IRWXU);
24 EXPECT_GE(fd, 0); 24 EXPECT_GE(fd, 0);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 TEST_F(MojioSysStatTest, Ebadf) { 65 TEST_F(MojioSysStatTest, Ebadf) {
66 struct mojio_stat buf = {}; 66 struct mojio_stat buf = {};
67 errno = 12345; 67 errno = 12345;
68 int result = mojio_fstat(-1, &buf); 68 int result = mojio_fstat(-1, &buf);
69 int errno_value = errno; 69 int errno_value = errno;
70 EXPECT_EQ(-1, result); 70 EXPECT_EQ(-1, result);
71 EXPECT_EQ(EBADF, errno_value); 71 EXPECT_EQ(EBADF, errno_value);
72 } 72 }
73 73
74 } // namespace 74 } // namespace
OLDNEW
« no previous file with comments | « mojo/services/files/c/tests/mojio_impl_test_base.cc ('k') | mojo/services/files/c/tests/mojio_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698