Chromium Code Reviews| Index: native_client_sdk/src/libraries/nacl_io_test/mount_dev_mock.h |
| diff --git a/native_client_sdk/src/libraries/nacl_io_test/mount_dev_mock.h b/native_client_sdk/src/libraries/nacl_io_test/mount_dev_mock.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..063d8bf9fc2cba2c04ee65a5e50ced43be3f3e71 |
| --- /dev/null |
| +++ b/native_client_sdk/src/libraries/nacl_io_test/mount_dev_mock.h |
| @@ -0,0 +1,24 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef LIBRARIES_NACL_IO_TEST_MOUNT_NODE_MOCK_H_ |
| +#define LIBRARIES_NACL_IO_TEST_MOUNT_NODE_MOCK_H_ |
| + |
| +#include "gmock/gmock.h" |
| + |
| +#include "nacl_io/mount.h" |
| +#include "nacl_io/mount_dev.h" |
| + |
| +#define NULL_NODE ((MountNode*) NULL) |
| + |
| +class MountDevMock : public nacl_io::MountDev { |
| + public: |
| + MountDevMock() { |
| + nacl_io::StringMap_t map; |
| + Init(1, map, NULL); |
| + } |
| + int num_nodes() { return (int) inode_pool_.size(); } |
| +}; |
| + |
| +#endif |
|
binji
2013/08/20 18:26:49
nit: include guard comment
Sam Clegg
2013/08/20 19:09:36
Done.
|