| 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/tests/test_utils.h" | 5 #include "files/c/tests/test_utils.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 | 8 |
| 9 #include "files/public/c/tests/mock_errno_impl.h" | 9 #include "files/c/tests/mock_errno_impl.h" |
| 10 #include "files/public/c/tests/mojio_impl_test_base.h" | 10 #include "files/c/tests/mojio_impl_test_base.h" |
| 11 #include "files/public/c/tests/test_utils.h" | 11 #include "files/c/tests/test_utils.h" |
| 12 | 12 |
| 13 namespace mojio { | 13 namespace mojio { |
| 14 namespace test { | 14 namespace test { |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 using TestUtilsTest = mojio::test::MojioImplTestBase; | 17 using TestUtilsTest = mojio::test::MojioImplTestBase; |
| 18 | 18 |
| 19 TEST_F(TestUtilsTest, MakeDirAt) { | 19 TEST_F(TestUtilsTest, MakeDirAt) { |
| 20 EXPECT_EQ(-1, GetFileSize(&directory(), "my_file")); | 20 EXPECT_EQ(-1, GetFileSize(&directory(), "my_file")); |
| 21 EXPECT_EQ(-1, GetFileSize(&directory(), "my_dir/my_file")); | 21 EXPECT_EQ(-1, GetFileSize(&directory(), "my_dir/my_file")); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 for (size_t i = 0; i < 456; i++) { | 63 for (size_t i = 0; i < 456; i++) { |
| 64 unsigned char c = static_cast<unsigned char>(i); | 64 unsigned char c = static_cast<unsigned char>(i); |
| 65 s_456[i] = *reinterpret_cast<char*>(&c); | 65 s_456[i] = *reinterpret_cast<char*>(&c); |
| 66 } | 66 } |
| 67 EXPECT_EQ(s_456, GetFileContents(&directory(), "file_456")); | 67 EXPECT_EQ(s_456, GetFileContents(&directory(), "file_456")); |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace | 70 } // namespace |
| 71 } // namespace test | 71 } // namespace test |
| 72 } // namespace mojio | 72 } // namespace mojio |
| OLD | NEW |