void run() { { beast::asio::streambuf b(10); std::string const s = "1234567890"; b << s; expect (to_str(b.data()) == s); b.prepare(5); } { beast::asio::streambuf b(10); b.prepare(10); b.commit(10); b.consume(10); } { beast::asio::streambuf b(5); boost::asio::buffer_copy(b.prepare(14), boost::asio::buffer(std::string("1234567890ABCD"))); b.commit(4); expect(to_str(b.data()) == "1234"); b.consume(4); b.commit(10); expect(to_str(b.data()) == "567890ABCD"); } test_prepare(); test_commit(); test_consume(); }
int main (int argc, char ** argv) { printf ("ZEROMQSEND TESTS\n"); printf ("================\n\n"); init (argc, argv); int major, minor, patch; zmq_version (&major, &minor, &patch); printf ("zeromq version is %d.%d.%d\n", major, minor, patch); context = zmq_ctx_new (); // Test notification from plugin test_commit (); // test timeouts test_timeoutConnect (); test_timeoutSubscribe (); print_result ("testmod_zeromqsend"); zmq_ctx_destroy (context); return nbError; }
int main (int argc, char *argv[]) { plan (31); test_put (); // 3 test_get (); // 8 test_watch (); // 7 test_unwatch (); // 2 test_commit (); // 7 test_getroot (); // 2 test_setroot (); // 2 done_testing(); return (0); }