Skip to content

Commit

Permalink
🤡 (mocks): Add mock for leka::BufferedSerial
Browse files Browse the repository at this point in the history
  • Loading branch information
Kabroc committed May 19, 2021
1 parent 13f5c34 commit 99dd7af
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/unit/mocks/mock_CoreBufferedSerial.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Leka - LekaOS
// Copyright 2021 APF France handicap
// SPDX-License-Identifier: Apache-2.0

#ifndef _LEKA_OS_BUFFERED_SERIAL_MOCK_H_
#define _LEKA_OS_BUFFERED_SERIAL_MOCK_H_

#include "CoreBufferedSerial.h"
#include "gmock/gmock.h"

namespace leka {

class CoreBufferedSerialMock : public interface::BufferedSerial
{
public:
MOCK_METHOD(ssize_t, read, (uint8_t *, ssize_t), (override));
MOCK_METHOD(ssize_t, write, (const uint8_t *, ssize_t), (override));
};

} // namespace leka

#endif // _LEKA_OS_BUFFERED_SERIAL_MOCK_H_

0 comments on commit 99dd7af

Please sign in to comment.