diff --git a/src/wrapper.hh b/src/wrapper.hh index 287550c..caa44c7 100644 --- a/src/wrapper.hh +++ b/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;} diff --git a/test/unittest_message.cc b/test/unittest_message.cc new file mode 100644 index 0000000..9c1830e --- /dev/null +++ b/test/unittest_message.cc @@ -0,0 +1,11 @@ +#include + +#include "../src/types.hh" + + +TEST( MessageTest, Simple ) +{ + pEp::Message msg{PEP_dir_outgoing, "\r\n"}; + + EXPECT_EQ(msg->dir, PEP_dir_outgoing); +}