libNbiotCore/test/serial_test.cpp
// Tests if a single character can be written to the buffer
Tests if a single character can be written to the buffer
Tests if a single character can be written to the buffer
TEST (SerialTest, WriteSingleChar) {
    Serial s;
    pSerCom = new MockSerialCom();
    s.configSetPutChar(writeByte);
    EXPECT_CALL(*pSerCom, writeByte('c'))
            .Times(1);
    EXPECT_EQ(1, s.write('c'));
    EXPECT_EQ(((int) Serial::NoError), s.getError());
    delete (pSerCom);
}
TEST ( SerialTest , WriteSingleChar ) { Serial s ; pSerCom = new MockSerialCom ( ) ; s . configSetPutChar ( writeByte ) ; EXPECT_CALL ( * pSerCom , writeByte ( ' ' ) ) . Times ( 1 ) ; EXPECT_EQ ( 1 , s . write ( ' ' ) ) ; EXPECT_EQ ( ( ( int ) Serial :: NoError ) , s . getError ( ) ) ; delete ( pSerCom ) ; }
Tests if a single character can be written to the buffer
Tests if a single character can be written to the buffer