| 1 |
/* |
| 2 |
* |
| 3 |
* Copyright 2021 gRPC authors. |
| 4 |
* |
| 5 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 |
* you may not use this file except in compliance with the License. |
| 7 |
* You may obtain a copy of the License at |
| 8 |
* |
| 9 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 10 |
* |
| 11 |
* Unless required by applicable law or agreed to in writing, software |
| 12 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 13 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 |
* See the License for the specific language governing permissions and |
| 15 |
* limitations under the License. |
| 16 |
* |
| 17 |
*/ |
| 18 |
|
| 19 |
#import <XCTest/XCTest.h> |
| 20 |
|
| 21 |
#import "test/runner.h" |
| 22 |
#import "test/task.h" |
| 23 |
|
| 24 |
// Tests in: |
| 25 |
// libuv/test/test-getaddrinfo.c |
| 26 |
|
| 27 |
TEST_DECLARE(getaddrinfo_fail) |
| 28 |
TEST_DECLARE(getaddrinfo_fail_sync) |
| 29 |
TEST_DECLARE(getaddrinfo_basic) |
| 30 |
TEST_DECLARE(getaddrinfo_basic_sync) |
| 31 |
TEST_DECLARE(getaddrinfo_concurrent) |
| 32 |
|
| 33 |
#define TASK_LIST_START_LOCAL static task_entry_t TEST_TASKS[] = { |
| 34 |
TASK_LIST_START_LOCAL |
| 35 |
TEST_ENTRY(getaddrinfo_fail) |
| 36 |
TEST_ENTRY(getaddrinfo_fail_sync) |
| 37 |
TEST_ENTRY(getaddrinfo_basic) |
| 38 |
TEST_ENTRY(getaddrinfo_basic_sync) |
| 39 |
TEST_ENTRY(getaddrinfo_concurrent) |
| 40 |
TASK_LIST_END |
| 41 |
|
| 42 |
@interface LibuvGetAddrInfoTests : XCTestCase |
| 43 |
|
| 44 |
@end |
| 45 |
|
| 46 |
@implementation LibuvGetAddrInfoTests |
| 47 |
|
| 48 |
- (void)testGetAddrInfoAll { |
| 49 |
for (task_entry_t* task = TEST_TASKS; task->main; task++) { |
| 50 |
task->main(); |
| 51 |
} |
| 52 |
} |
| 53 |
|
| 54 |
@end |