aboutsummaryrefslogtreecommitdiff
path: root/test/interop/ping_test.c
diff options
context:
space:
mode:
authorOskari Timperi <oskari.timperi@iki.fi>2017-03-06 21:31:07 +0200
committerOskari Timperi <oskari.timperi@iki.fi>2017-03-06 21:31:07 +0200
commita062d934aef40829d9559a8ca83147ea4c44108e (patch)
tree6ee1f9eb3208bea65365e63d039ad27c40111c6f /test/interop/ping_test.c
parente9958e8a0f5aa5fbe0a4a03be42b8bf640add6f7 (diff)
downloadmqtt-a062d934aef40829d9559a8ca83147ea4c44108e.tar.gz
mqtt-a062d934aef40829d9559a8ca83147ea4c44108e.zip
Massive refactoring of the internals
Diffstat (limited to 'test/interop/ping_test.c')
-rw-r--r--test/interop/ping_test.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/interop/ping_test.c b/test/interop/ping_test.c
new file mode 100644
index 0000000..6d699da
--- /dev/null
+++ b/test/interop/ping_test.c
@@ -0,0 +1,27 @@
+#include "greatest.h"
+#include "testclient.h"
+#include "cleanup.c"
+#include "topics.c"
+
+TEST ping_test()
+{
+ TestClient *client;
+
+ client = TestClientNew("clienta");
+ ASSERT(TestClientConnect(client, "localhost", 1883, 1, 1));
+ ASSERT(TestClientWait(client, 5000));
+ TestClientDisconnect(client);
+ TestClientFree(client);
+
+ PASS();
+}
+
+GREATEST_MAIN_DEFS();
+
+int main(int argc, char **argv)
+{
+ GREATEST_MAIN_BEGIN();
+ cleanup();
+ RUN_TEST(ping_test);
+ GREATEST_MAIN_END();
+}