X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=example-codegen%2Fclient.cpp;h=266bef0aca2fdca359a9c0158fc4c7a342776ef6;hp=10d2e52d7d2d65144fa17e6a434f3ab0f36e7361;hb=e5bc4700c8dd5a178d4c40c163a4107901698b6f;hpb=71ae912ce0ade8f13cbffe0f105dad453f5e579f diff --git a/example-codegen/client.cpp b/example-codegen/client.cpp index 10d2e52..266bef0 100644 --- a/example-codegen/client.cpp +++ b/example-codegen/client.cpp @@ -12,11 +12,24 @@ int main(int argc, char** argv) { libt2n::socket_client_connection sc("./socket"); + libt2n::socket_client_connection sc_other("./socket_other"); cmd_group_default_client cc(sc); + cmd_group_other_client cc_other(sc_other); - return ( ( cc.testfunc("hello") == "hello, testfunc() was here" ) + bool throwok=false; + try + { + cc.testfunc("throw"); + }catch(libt2n::t2n_runtime_error &e){ + throwok=(std::string(e.what())=="throw me around"); + } + + return ( throwok + && ( cc.testfunc("hello") == "hello, testfunc() was here" ) && ( cc.testfunc_ref("hello") == "hello, testfunc() was here" ) && ( cc.t2(10) == 10 ) - && ( cc.t3(10, 20, "hello", std::pair(10,20)) ) ) + && ( cc_other.t3(10, 20, "hello", std::pair(10,20)) ) + && ( cc_other.t3(10) == 10 ) + && ( cc_other.t3(std::vector(1,10)) ) ) ? EXIT_SUCCESS : EXIT_FAILURE; }