Skip to content

Commit b737b9f

Browse files
committed
Problem: no test cases
Solution: added a few initial test cases
1 parent 7db13d3 commit b737b9f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

tests/example_add.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
#include "gtest/gtest.h"
1+
#include <gtest/gtest.h>
22
#include <zmq.hpp>
33

4-
TEST(create_context, add)
4+
TEST(context, create_default_destroy)
55
{
66
zmq::context_t context;
7+
}
8+
9+
TEST(context, create_close)
10+
{
11+
zmq::context_t context;
12+
context.close();
713

8-
14+
ASSERT_EQ(NULL, (void*)context);
15+
}
16+
17+
TEST(socket, create_destroy)
18+
{
19+
zmq::context_t context;
20+
zmq::socket_t socket(context, ZMQ_ROUTER);
921
}

0 commit comments

Comments
 (0)