Browse Source

test the wrapper for message.

master
roker 4 months ago
parent
commit
57ee30017d
2 changed files with 13 additions and 0 deletions
  1. +2
    -0
      src/wrapper.hh
  2. +11
    -0
      test/unittest_message.cc

+ 2
- 0
src/wrapper.hh View File

@ -96,6 +96,8 @@ public:
return value!=b.value;
}
const T* operator->() const { return value; }
const T* get() const { return value; }
T* move_out() { T* r = value; value=nullptr; return r;}


+ 11
- 0
test/unittest_message.cc View File

@ -0,0 +1,11 @@
#include <gtest/gtest.h>
#include "../src/types.hh"
TEST( MessageTest, Simple )
{
pEp::Message msg{PEP_dir_outgoing, "\r\n"};
EXPECT_EQ(msg->dir, PEP_dir_outgoing);
}

Loading…
Cancel
Save