| 317 | |
| 318 | |
| 319 | int main(int argc, char** argv) { |
| 320 | int failed = 0; |
| 321 | RUN_ARGV_TEST(failed, test_default_file()); |
| 322 | RUN_ARGV_TEST(failed, test_addr()); |
| 323 | RUN_ARGV_TEST(failed, test_invalid_config()); |
| 324 | RUN_ARGV_TEST(failed, test_invalid_json()); |
| 325 | RUN_ARGV_TEST(failed, test_default_connect().run()); |
| 326 | RUN_ARGV_TEST(failed, test_almost_default_connect().run()); |
| 327 | |
| 328 | bool have_sasl = pn_sasl_extended() && getenv("PN_SASL_CONFIG_PATH"); |
| 329 | pn_ssl_domain_t *have_ssl = pn_ssl_domain(PN_SSL_MODE_SERVER); |
| 330 | |
| 331 | if (have_sasl) { |
| 332 | RUN_ARGV_TEST(failed, test_host_user_pass().run()); |
| 333 | } |
| 334 | #ifndef _WIN32 |
| 335 | if (have_ssl) { |
| 336 | pn_ssl_domain_free(have_ssl); |
| 337 | RUN_ARGV_TEST(failed, test_tls().run()); |
| 338 | RUN_ARGV_TEST(failed, test_tls_default_fail().run()); |
| 339 | RUN_ARGV_TEST(failed, test_tls_external().run()); |
| 340 | if (have_sasl) { |
| 341 | RUN_ARGV_TEST(failed, test_tls_plain().run()); |
| 342 | } |
| 343 | } else { |
| 344 | std::cout << "SKIP: TLS tests, not available" << std::endl; |
| 345 | } |
| 346 | #else |
| 347 | std::cout << "SKIP: TLS tests, expected to fail on windows" << std::endl; |
| 348 | #endif |
| 349 | return failed; |
| 350 | } |
nothing calls this directly
no test coverage detected