Commit | Line | Data |
---|---|---|
86c1c2e9 JT |
1 | /*************************************************************************** |
2 | * Copyright (C) 2004 by Intra2net AG * | |
3 | * info@intra2net.com * | |
4 | * * | |
5 | ***************************************************************************/ | |
6 | ||
7 | #include <socket_client.hxx> | |
8 | ||
9 | // include library header | |
10 | #include "codegen_client.hxx" | |
11 | ||
12 | int main(int argc, char** argv) | |
13 | { | |
14 | libt2n::socket_client_connection sc("./socket"); | |
29ba0e97 | 15 | libt2n::socket_client_connection sc_other("./socket_other"); |
ae2e9f1b | 16 | cmd_group_default_client cc(sc); |
29ba0e97 | 17 | cmd_group_other_client cc_other(sc_other); |
86c1c2e9 | 18 | |
70e3d35c JT |
19 | bool throwok=false; |
20 | try | |
21 | { | |
22 | cc.testfunc("throw"); | |
23 | }catch(libt2n::t2n_runtime_error &e){ | |
24 | throwok=(std::string(e.what())=="throw me around"); | |
25 | } | |
26 | ||
27 | return ( throwok | |
28 | && ( cc.testfunc("hello") == "hello, testfunc() was here" ) | |
71ae912c JT |
29 | && ( cc.testfunc_ref("hello") == "hello, testfunc() was here" ) |
30 | && ( cc.t2(10) == 10 ) | |
29ba0e97 | 31 | && ( cc_other.t3(10, 20, "hello", std::pair<int, float>(10,20)) ) ) |
71ae912c | 32 | ? EXIT_SUCCESS : EXIT_FAILURE; |
86c1c2e9 | 33 | } |