libNbiotCore/test/serial_test.cpp
// Tests if error is set properly if trying to write multiple characters to the buffer
// without specifying a write function
Tests if error is set properly if trying to write multiple characters to the buffer
without specifying a write function
Tests if error is set properly if trying to write multiple characters to the buffer without specifying a write function
TEST (SerialTest, WriteMultipleCharsError) {
    Serial s;
    nbiot::string line;
    EXPECT_EQ(0, s.write("cccc"));
    EXPECT_EQ(((int) Serial::NoWriteFunction), s.getError());
}
TEST ( SerialTest , WriteMultipleCharsError ) { Serial s ; nbiot :: string line ; EXPECT_EQ ( 0 , s . write ( " " ) ) ; EXPECT_EQ ( ( ( int ) Serial :: NoWriteFunction ) , s . getError ( ) ) ; }
Tests if error is set properly if trying to write multiple characters to the buffer
without specifying a write function
Tests if error is set properly if trying to write multiple characters to the buffer without specifying a write function