diff options
Diffstat (limited to 'tests/mock/smack_mock.h')
-rw-r--r-- | tests/mock/smack_mock.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/tests/mock/smack_mock.h b/tests/mock/smack_mock.h index c548e05..2517c16 100644 --- a/tests/mock/smack_mock.h +++ b/tests/mock/smack_mock.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,20 +14,24 @@ * limitations under the License. */ -#ifndef MOCK_SMACK_H -#define MOCK_SMACK_H +#ifndef UNIT_TESTS_MOCK_SMACK_MOCK_H_ +#define UNIT_TESTS_MOCK_SMACK_MOCK_H_ -#include "mock.h" +#include <gmock/gmock.h> +#include <sys/smack.h> -#ifdef __cplusplus -extern "C" { -#endif +#include "module_mock.h" -DECLARE_FAKE_VALUE_FUNC(ssize_t, smack_new_label_from_path, const char*, - const char*, int, char**); +class SmackMock : public virtual ModuleMock { + public: + SmackMock() { + using ::testing::_; + using ::testing::Return; + using ::testing::Invoke; + } -#ifdef __cplusplus -} -#endif -#endif /* MOCK_SMACK_H */ + MOCK_METHOD4(smack_new_label_from_path, ssize_t (const char*, + const char*, int, char**)); +}; +#endif // UNIT_TESTS_MOCK_SMACK_MOCK_H_
\ No newline at end of file |