#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "services/device/serial/serial_io_handler_posix.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace device {
class SerialIoHandlerPosixTest : public testing::Test { … };
TEST_F(SerialIoHandlerPosixTest, NoErrorReadOnce) { … }
TEST_F(SerialIoHandlerPosixTest, NoErrorReadTwiceBytesReadTwoAndOne) { … }
TEST_F(SerialIoHandlerPosixTest, NoErrorReadTwiceBytesReadOneAndTwo) { … }
TEST_F(SerialIoHandlerPosixTest, NoErrorReadThreeTimes) { … }
TEST_F(SerialIoHandlerPosixTest, BreakReadOnce) { … }
TEST_F(SerialIoHandlerPosixTest, BreakReadOnceHasBytesBeforeAndAfterBreak) { … }
TEST_F(SerialIoHandlerPosixTest, BreakReadTwiceBytesReadTwoAndOne) { … }
TEST_F(SerialIoHandlerPosixTest,
BreakReadTwiceBytesReadTwoAndOneHasBytesBeforeAndAfterBreak) { … }
TEST_F(SerialIoHandlerPosixTest, BreakReadTwiceBytesReadOneAndTwo) { … }
TEST_F(SerialIoHandlerPosixTest,
BreakReadTwiceBytesReadOneAndTwoHasBytesBeforeAndAfterBreak) { … }
TEST_F(SerialIoHandlerPosixTest, BreakReadThreeTimes) { … }
TEST_F(SerialIoHandlerPosixTest,
BreakReadThreeTimesHasBytesBeforeAndAfterBreak) { … }
TEST_F(SerialIoHandlerPosixTest, ParityErrorReadOnce) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityErrorReadOnceHasBytesBeforeAndAfterParityError) { … }
TEST_F(SerialIoHandlerPosixTest, ParityErrorReadTwiceBytesReadTwoAndOne) { … }
TEST_F(
SerialIoHandlerPosixTest,
ParityErrorReadTwiceBytesReadTwoAndOneHasBytesBeforeAndAfterParityError) { … }
TEST_F(SerialIoHandlerPosixTest, ParityErrorReadTwiceBytesReadOneAndTwo) { … }
TEST_F(
SerialIoHandlerPosixTest,
ParityErrorReadTwiceBytesReadOneAndTwoHasBytesBeforeAndAfterParityError) { … }
TEST_F(SerialIoHandlerPosixTest, ParityErrorReadThreeTimes) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityErrorReadThreeTimesHasBytesBeforeAndAfterParityError) { … }
TEST_F(SerialIoHandlerPosixTest, TwoEOFsReadOnce) { … }
TEST_F(SerialIoHandlerPosixTest, TwoEOFsReadOnceHasBytesBeforeAndAfterEOF) { … }
TEST_F(SerialIoHandlerPosixTest, TwoEOFsReadTwice) { … }
TEST_F(SerialIoHandlerPosixTest, TwoEOFsReadTwiceHasBytesBeforeAndAfterEOF) { … }
TEST_F(SerialIoHandlerPosixTest, ParityCheckDisabledReadOnce) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadOnceHasBytesBeforeAndAfter) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadTwiceBytesReadTwoAndOne) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadTwiceBytesReadTwoAndOneHasBytesAfter) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadTwiceBytesReadTwoAndOneLargerBufferLen) { … }
TEST_F(
SerialIoHandlerPosixTest,
ParityCheckDisabledReadTwiceBytesReadTwoAndOneBufferLenThreeHasBytesBeforeAndAfter) { … }
TEST_F(
SerialIoHandlerPosixTest,
ParityCheckDisabledReadTwiceBytesReadTwoAndOneLargerBufferLenHasBytesBeforeAndAfter) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadTwiceBytesReadOneAndTwo) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadTwiceBytesReadOneAndTwoHasBytesBefore) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadTwiceBytesReadOneAndTwoLargerBufferLen) { … }
TEST_F(
SerialIoHandlerPosixTest,
ParityCheckDisabledReadTwiceBytesReadOneAndTwoBufferLenThreeHasBytesBeforeAndAfter) { … }
TEST_F(
SerialIoHandlerPosixTest,
ParityCheckDisabledReadTwiceBytesReadOneAndTwoLargerBufferLenHasBytesBeforeAndAfter) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadThreeTimesBufferLenOne) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadThreeTimesBufferLenTwo) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadThreeTimesLargerBufferLen) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadThreeTimesBufferLenThreeByteBeforeAndAfter) { … }
TEST_F(SerialIoHandlerPosixTest,
ParityCheckDisabledReadThreeTimesLargerBufferLenHasBytesBeforeAndAfter) { … }
TEST_F(SerialIoHandlerPosixTest, BytesReadZero) { … }
TEST_F(SerialIoHandlerPosixTest, InvalidSequenceReadOnce) { … }
TEST_F(SerialIoHandlerPosixTest, InvalidSequenceReadTwiceBytesReadTwoAndOne) { … }
TEST_F(SerialIoHandlerPosixTest, InvalidSequenceReadTwiceBytesReadOneAndTwo) { … }
TEST_F(SerialIoHandlerPosixTest,
InvalidSequenceReadTwiceBytesReadOneAndTwoLargerBufferLen) { … }
TEST_F(SerialIoHandlerPosixTest, InvalidSequenceReadThreeTimes) { … }
TEST_F(SerialIoHandlerPosixTest, InvalidSequenceReadThreeTimesLargerBufferLen) { … }
TEST_F(SerialIoHandlerPosixTest, CharsStashedPreset) { … }
TEST_F(SerialIoHandlerPosixTest, BreakAndEOFAndParityError) { … }
TEST_F(SerialIoHandlerPosixTest, BreakAndEOFAndParityErrorReadThreeTimes) { … }
}