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

Side by Side Diff: mojo/services/files/c/tests/errno_impl_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 // This basically tests |ErrnoImpl::Setter|, since |ErrnoImpl| itself is just a 5 // This basically tests |ErrnoImpl::Setter|, since |ErrnoImpl| itself is just a
6 // simple interface. 6 // simple interface.
7 7
8 #include "files/public/c/lib/errno_impl.h" 8 #include "files/c/lib/errno_impl.h"
9 9
10 #include "files/public/c/tests/mock_errno_impl.h" 10 #include "files/c/tests/mock_errno_impl.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace mojio { 13 namespace mojio {
14 namespace { 14 namespace {
15 15
16 TEST(ErrnoImplTest, Setter) { 16 TEST(ErrnoImplTest, Setter) {
17 const int kLastErrorSentinel = -12345; 17 const int kLastErrorSentinel = -12345;
18 18
19 test::MockErrnoImpl errno_impl(-123); 19 test::MockErrnoImpl errno_impl(-123);
20 20
(...skipping 27 matching lines...) Expand all
48 errno_impl.Reset(90); 48 errno_impl.Reset(90);
49 EXPECT_FALSE(errno_impl.was_set()); // Shouldn't be set until destruction. 49 EXPECT_FALSE(errno_impl.was_set()); // Shouldn't be set until destruction.
50 } 50 }
51 EXPECT_TRUE(errno_impl.was_set()); 51 EXPECT_TRUE(errno_impl.was_set());
52 // But it'll be set to the explicitly-set value. 52 // But it'll be set to the explicitly-set value.
53 EXPECT_EQ(456, errno_impl.Get()); 53 EXPECT_EQ(456, errno_impl.Get());
54 } 54 }
55 55
56 } // namespace 56 } // namespace
57 } // namespace mojio 57 } // namespace mojio
OLDNEW
« no previous file with comments | « mojo/services/files/c/tests/directory_wrapper_unittest.cc ('k') | mojo/services/files/c/tests/fd_table_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698