| OLD | NEW |
| 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/real_errno_impl.h" | 5 #include "files/c/lib/real_errno_impl.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 | 8 |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| 11 namespace mojio { | 11 namespace mojio { |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 TEST(RealErrnoImplTest, GetSet) { | 14 TEST(RealErrnoImplTest, GetSet) { |
| 15 RealErrnoImpl errno_impl; | 15 RealErrnoImpl errno_impl; |
| 16 | 16 |
| 17 errno = 123; | 17 errno = 123; |
| 18 EXPECT_EQ(123, errno_impl.Get()); | 18 EXPECT_EQ(123, errno_impl.Get()); |
| 19 | 19 |
| 20 errno_impl.Set(456); | 20 errno_impl.Set(456); |
| 21 EXPECT_EQ(456, errno); | 21 EXPECT_EQ(456, errno); |
| 22 } | 22 } |
| 23 | 23 |
| 24 } // namespace | 24 } // namespace |
| 25 } // namespace mojio | 25 } // namespace mojio |
| OLD | NEW |