| 79 | } |
| 80 | |
| 81 | long testPortOpen(std::ostream &out) |
| 82 | { |
| 83 | long port = AdsPortOpenEx(); |
| 84 | if (!port) { |
| 85 | return 0; |
| 86 | } |
| 87 | |
| 88 | AmsAddr addr; |
| 89 | if (AdsGetLocalAddressEx(port, &addr)) { |
| 90 | AdsPortCloseEx(port); |
| 91 | return 0; |
| 92 | } |
| 93 | out << "Port: " << port << ' '; |
| 94 | print(addr, out); |
| 95 | return port; |
| 96 | } |
| 97 | |
| 98 | struct TestAds : test_base<TestAds> { |
| 99 | static const int NUM_TEST_LOOPS = 10; |
no test coverage detected