blob: 84d3ebc2502b5fe2a65aeb7fe14039efc247171b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "greatest.h"
#include "testclient.h"
#include "cleanup.c"
#include "topics.c"
TEST subscribe_failure_test()
{
TestClient *client;
client = TestClientNew("clienta");
ASSERT(TestClientConnect(client, "localhost", 1883, 60, 1));
ASSERT_FALSE(TestClientSubscribe(client, nosubscribe_topics[0], 2));
ASSERT_EQ(MqttSubscriptionFailure, client->subStatus);
TestClientDisconnect(client);
TestClientFree(client);
PASS();
}
GREATEST_MAIN_DEFS();
int main(int argc, char **argv)
{
GREATEST_MAIN_BEGIN();
cleanup();
RUN_TEST(subscribe_failure_test);
GREATEST_MAIN_END();
}
|