libNbiotCore/test/serial_test.cpp
// Tests that copied object is independent of original
Tests that copied object is independent of original
Tests that copied object is independent of original
TEST(SerialTest, SerialCopyConstructor) {
    int dbgprf = 1;
    Serial s(dbgprf);
    Serial s_copy(s);
    EXPECT_EQ(0, s_copy.getDebugPrefix());
    EXPECT_EQ(s.getError(), s_copy.getError());
    s_copy.setDebugPrefix(dbgprf + 1);
    EXPECT_NE(s.getDebugPrefix(), s_copy.getDebugPrefix());
    s_copy.configSetReadByte(nullptr);
    EXPECT_NE(s.getError(), s_copy.getError());
}
TEST ( SerialTest , SerialCopyConstructor ) { int dbgprf = 1 ; Serial s ( dbgprf ) ; Serial s_copy ( s ) ; EXPECT_EQ ( 0 , s_copy . getDebugPrefix ( ) ) ; EXPECT_EQ ( s . getError ( ) , s_copy . getError ( ) ) ; s_copy . setDebugPrefix ( dbgprf + 1 ) ; EXPECT_NE ( s . getDebugPrefix ( ) , s_copy . getDebugPrefix ( ) ) ; s_copy . configSetReadByte ( nullptr ) ; EXPECT_NE ( s . getError ( ) , s_copy . getError ( ) ) ; }
Tests that copied object is independent of original
Tests that copied object is independent of original