libNbiotCore/test/serial_test.cpp
// Tests if error is set properly if trying to write to the buffer without specifying a write function
Tests if error is set properly if trying to write to the buffer without specifying a write function
Tests if error is set properly if trying to write to the buffer without specifying a write function
TEST (SerialTest, WriteSingleCharError) {
    Serial s;
    nbiot::string line;
    EXPECT_EQ(0, s.write('c'));
    EXPECT_EQ(((int) Serial::NoWriteFunction), s.getError());
}
TEST ( SerialTest , WriteSingleCharError ) { 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 to the buffer without specifying a write function
Tests if error is set properly if trying to write to the buffer without specifying a write function