+ // ---- wormhole state -----------
+ state = rmr_wh_state( NULL, 0 );
+ errors += fail_if_equal( state, RMR_OK, "wh_state with bad context did not return error" );
+
+ state = rmr_wh_state( ctx, -1 );
+ errors += fail_if_equal( state, RMR_OK, "wh_state with bad whid did not return error" );
+
+ whid = rmr_wh_open( ctx, "localhost:9219" );
+ if( ! fail_if_equal( whid, -1, "skipping some wh_state tests: no whid returned" ) ) {
+ state = rmr_wh_state( ctx, whid );
+ errors += fail_not_equal( state, RMR_OK, "wh_state on an open wh did not return OK" );
+
+ rmr_wh_close( ctx, whid );
+ state = rmr_wh_state( ctx, whid );
+ errors += fail_if_equal( state, RMR_OK, "wh_state on a closed wh returned OK" );
+ whid = -1;
+ }