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