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

Side by Side Diff: mojo/services/files/c/tests/fd_table_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 #include "files/public/c/lib/fd_table.h" 5 #include "files/c/lib/fd_table.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
11 #include "files/public/c/lib/fd_impl.h" 11 #include "files/c/lib/fd_impl.h"
12 #include "files/public/c/tests/mock_errno_impl.h" 12 #include "files/c/tests/mock_errno_impl.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace mojio { 15 namespace mojio {
16 namespace { 16 namespace {
17 17
18 class TestFDImpl : public FDImpl { 18 class TestFDImpl : public FDImpl {
19 public: 19 public:
20 TestFDImpl() : FDImpl(nullptr) {} 20 TestFDImpl() : FDImpl(nullptr) {}
21 ~TestFDImpl() override {} 21 ~TestFDImpl() override {}
22 22
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 EXPECT_EQ(kLastErrorSentinel, errno_impl.Get()); // No error. 170 EXPECT_EQ(kLastErrorSentinel, errno_impl.Get()); // No error.
171 171
172 // Now adding should be okay again. 172 // Now adding should be okay again.
173 errno_impl.Reset(kLastErrorSentinel); 173 errno_impl.Reset(kLastErrorSentinel);
174 EXPECT_EQ(0, fd_table.Add(std::unique_ptr<FDImpl>(new TestFDImpl()))); 174 EXPECT_EQ(0, fd_table.Add(std::unique_ptr<FDImpl>(new TestFDImpl())));
175 EXPECT_EQ(kLastErrorSentinel, errno_impl.Get()); // No error. 175 EXPECT_EQ(kLastErrorSentinel, errno_impl.Get()); // No error.
176 } 176 }
177 177
178 } // namespace 178 } // namespace
179 } // namespace mojio 179 } // namespace mojio
OLDNEW
« no previous file with comments | « mojo/services/files/c/tests/errno_impl_unittest.cc ('k') | mojo/services/files/c/tests/file_fd_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698