libNbiotCore/test/serial_test.cpp
// Tests if a const char array can be written to the buffer
Tests if a const char array can be written to the buffer
Tests if a const char array can be written to the buffer
TEST (SerialTest, WriteMultipleChars) {
    Serial s;
    pSerCom = new MockSerialCom();
    s.configSetPutChar(writeByte);
    EXPECT_CALL(*pSerCom, writeByte('c'))
            .Times(4);
    EXPECT_EQ(4, s.write("cccc", 4));
    EXPECT_EQ(((int) Serial::NoError), s.getError());
    delete (pSerCom);
}
TEST ( SerialTest , WriteMultipleChars ) { Serial s ; pSerCom = new MockSerialCom ( ) ; s . configSetPutChar ( writeByte ) ; EXPECT_CALL ( * pSerCom , writeByte ( ' ' ) ) . Times ( 4 ) ; EXPECT_EQ ( 4 , s . write ( " " , 4 ) ) ; EXPECT_EQ ( ( ( int ) Serial :: NoError ) , s . getError ( ) ) ; delete ( pSerCom ) ; }
Tests if a const char array can be written to the buffer
Tests if a const char array can be written to the buffer