Browse Source

add an EXPECT_NE() to check for nullptr before derefencing it. Avoids segfault. But the test is still red.

master
roker 9 months ago
parent
commit
0c82dcc5dc
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      test/unittest_message.cc

+ 2
- 0
test/unittest_message.cc View File

@ -118,6 +118,8 @@ TEST( MessageTest, Simple )
pEp::Message msg{PEP_dir_outgoing, mail1_eml};
EXPECT_EQ(msg->dir, PEP_dir_outgoing);
ASSERT_NE(msg->from, nullptr);
EXPECT_STREQ( msg->from->username, "Alice");
EXPECT_STREQ( msg->shortmsg, "Rødgrød med fløde" );
EXPECT_STREQ( msg->longmsg , "Rødgrød med fløde?\r\n" );


Loading…
Cancel
Save