Browse Source

test the wrapper for message.

master
roker 4 years ago
parent
commit
57ee30017d
  1. 2
      src/wrapper.hh
  2. 11
      test/unittest_message.cc

2
src/wrapper.hh

@ -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
test/unittest_message.cc

@ -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