| OLD | NEW |
| 1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2013 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 | 5 |
| 6 #include <string> | 6 #include <string> |
| 7 #include <vector> | 7 #include <vector> |
| 8 #include "gtest/gtest.h" | 8 #include "gtest/gtest.h" |
| 9 #include "nacl_io/kernel_proxy.h" | 9 #include "nacl_io/kernel_proxy.h" |
| 10 #include "nacl_io/kernel_intercept.h" | 10 #include "nacl_io/kernel_intercept.h" |
| 11 #include "nacl_io/kernel_wrap.h" | 11 #include "nacl_io/kernel_wrap.h" |
| 12 #include "kernel_proxy_mock.h" | 12 #include "kernel_proxy_mock.h" |
| 13 | 13 |
| 14 using namespace nacl_io; |
| 15 |
| 14 using ::testing::_; | 16 using ::testing::_; |
| 15 using ::testing::Return; | 17 using ::testing::Return; |
| 16 using ::testing::StrEq; | 18 using ::testing::StrEq; |
| 17 | 19 |
| 18 namespace { | 20 namespace { |
| 19 | 21 |
| 20 #define COMPARE_FIELD(f) \ | 22 #define COMPARE_FIELD(f) \ |
| 21 if (arg->f != statbuf->f) { \ | 23 if (arg->f != statbuf->f) { \ |
| 22 *result_listener << "mismatch of field \""#f"\". " \ | 24 *result_listener << "mismatch of field \""#f"\". " \ |
| 23 "expected: " << statbuf->f << \ | 25 "expected: " << statbuf->f << \ |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 const struct utimbuf* times; | 278 const struct utimbuf* times; |
| 277 EXPECT_CALL(mock, utime(StrEq("utime"), times)); | 279 EXPECT_CALL(mock, utime(StrEq("utime"), times)); |
| 278 utime("utime", times); | 280 utime("utime", times); |
| 279 } | 281 } |
| 280 | 282 |
| 281 TEST_F(KernelWrapTest, write) { | 283 TEST_F(KernelWrapTest, write) { |
| 282 EXPECT_CALL(mock, write(6789, NULL, 7891)).Times(1); | 284 EXPECT_CALL(mock, write(6789, NULL, 7891)).Times(1); |
| 283 write(6789, NULL, 7891); | 285 write(6789, NULL, 7891); |
| 284 } | 286 } |
| 285 | 287 |
| OLD | NEW |