diff options
| author | Patrick Venture <venture@google.com> | 2018-06-12 10:47:15 -0700 |
|---|---|---|
| committer | Patrick Venture <venture@google.com> | 2018-06-13 10:05:17 -0700 |
| commit | 4bd518d5eb378d7af3d91a2afeed01ebd6f57f52 (patch) | |
| tree | f2e8ac4f0ef5771f8f836318ae3fb66d9cc42425 /test | |
| parent | 6246393df4181d3f689d762bdb7beecb39fcb56d (diff) | |
| download | phosphor-pid-control-4bd518d5eb378d7af3d91a2afeed01ebd6f57f52.tar.gz phosphor-pid-control-4bd518d5eb378d7af3d91a2afeed01ebd6f57f52.zip | |
test: add controller_mock
Add controller mock.
Change-Id: I7341b26281571c91039f05e049cf54c50f9fccdb
Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'test')
| -rw-r--r-- | test/controller_mock.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/controller_mock.hpp b/test/controller_mock.hpp new file mode 100644 index 0000000..241e83a --- /dev/null +++ b/test/controller_mock.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include <gmock/gmock.h> + +#include "pid/controller.hpp" + +class ControllerMock : public PIDController +{ + public: + virtual ~ControllerMock() = default; + + ControllerMock(const std::string& id, PIDZone* owner) + : PIDController(id, owner) {} + + MOCK_METHOD0(input_proc, float()); + MOCK_METHOD0(setpt_proc, float()); + MOCK_METHOD1(output_proc, void(float)); +}; |

