X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=example-codegen%2Fclient.cpp;h=1029abeb7fa67ea1c3e4cc269e4260b218a2f4a4;hp=f7d94eab02e7f62050738e72bf67ba6c2c28b097;hb=d0a97d0bbe03472214e379b7a4ace2bdcecfc212;hpb=70e3d35c116c6483a8c78d2296122f2f90835349 diff --git a/example-codegen/client.cpp b/example-codegen/client.cpp index f7d94ea..1029abe 100644 --- a/example-codegen/client.cpp +++ b/example-codegen/client.cpp @@ -6,13 +6,16 @@ #include -// include library header -#include "codegen_client.hxx" +// include generated library headers +#include "default_client.hxx" +#include "other_client.hxx" 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); bool throwok=false; try @@ -22,10 +25,15 @@ int main(int argc, char** argv) throwok=(std::string(e.what())=="throw me around"); } + Foo foo={10,10}; + 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)) ) + && ( cc_other.t3(foo) ) ) ? EXIT_SUCCESS : EXIT_FAILURE; }