Skip to content

Commit

Permalink
Problem: xpub test has broken style (missing whitespace).
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Mar 30, 2017
1 parent ce1723c commit 3ad19a4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/test_xpub_welcome_msg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

int main (void)
{
setup_test_environment();
setup_test_environment ();
void *ctx = zmq_ctx_new ();
assert (ctx);

Expand All @@ -42,15 +42,15 @@ int main (void)
assert (rc == 0);

// set pub socket options
rc = zmq_setsockopt(pub, ZMQ_XPUB_WELCOME_MSG, "W", 1);
rc = zmq_setsockopt (pub, ZMQ_XPUB_WELCOME_MSG, "W", 1);
assert (rc == 0);

// Create a subscriber
void *sub = zmq_socket (ctx, ZMQ_SUB);

// Subscribe to the welcome message
rc = zmq_setsockopt(sub, ZMQ_SUBSCRIBE, "W", 1);
assert(rc == 0);
rc = zmq_setsockopt (sub, ZMQ_SUBSCRIBE, "W", 1);
assert (rc == 0);

assert (sub);
rc = zmq_connect (sub, "inproc://soname");
Expand All @@ -60,14 +60,14 @@ int main (void)

// Receive the welcome subscription
rc = zmq_recv(pub, buffer, 2, 0);
assert(rc == 2);
assert(buffer[0] == 1);
assert(buffer[1] == 'W');
assert (rc == 2);
assert (buffer [0] == 1);
assert (buffer [1] == 'W');

// Receive the welcome message
rc = zmq_recv(sub, buffer, 1, 0);
assert(rc == 1);
assert(buffer[0] == 'W');
rc = zmq_recv (sub, buffer, 1, 0);
assert (rc == 1);
assert (buffer [0] == 'W');

// Clean up.
rc = zmq_close (pub);
Expand Down

0 comments on commit 3ad19a4

Please sign in to comment.