|
1 | 1 | /** Auto Tests: basic network profile functionality test (UDP only) |
2 | | - * TODO(JFreegman): test TCP packets as well |
3 | 2 | */ |
4 | 3 |
|
5 | 4 | #include <inttypes.h> |
@@ -110,10 +109,24 @@ int main(void) |
110 | 109 | { |
111 | 110 | setvbuf(stdout, nullptr, _IONBF, 0); |
112 | 111 |
|
| 112 | + Tox_Err_Options_New options_err; |
| 113 | + struct Tox_Options *tox_opts = tox_options_new(&options_err); |
| 114 | + |
| 115 | + ck_assert_msg(options_err == TOX_ERR_OPTIONS_NEW_OK, "Failed to initialize tox options: %d\n", options_err); |
| 116 | + |
| 117 | + tox_options_default(tox_opts); |
| 118 | + tox_options_set_udp_enabled(tox_opts, true); |
| 119 | + |
113 | 120 | Run_Auto_Options autotox_opts = default_run_auto_options(); |
114 | 121 | autotox_opts.graph = GRAPH_COMPLETE; |
115 | 122 |
|
116 | | - run_auto_test(nullptr, NUM_TOXES, test_netprof, 0, &autotox_opts); |
| 123 | + run_auto_test(tox_opts, NUM_TOXES, test_netprof, 0, &autotox_opts); |
| 124 | + |
| 125 | + // TODO(Jfreegman): uncomment this when TCP autotests are fixed |
| 126 | + // tox_options_set_udp_enabled(tox_opts, false); |
| 127 | + // run_auto_test(tox_opts, NUM_TOXES, test_netprof, 0, &autotox_opts); |
| 128 | + |
| 129 | + tox_options_free(tox_opts); |
117 | 130 |
|
118 | 131 | return 0; |
119 | 132 | } |
|
0 commit comments