Differences From Artifact [22c6695ef5]:
- File
tests/OFDNSResolverTests.m
— part of check-in
[dc0c6c34ab]
at
2019-02-17 22:44:23
on branch trunk
— tests: Only import ObjFW.h
This prevents forgetting to add an import to ObjFW.h, as the tests would
then not compile. (user: js, size: 1951) [annotate] [blame] [check-ins using]
To Artifact [f214844b74]:
- File tests/OFDNSResolverTests.m — part of check-in [b045cbb9c7] at 2019-03-25 00:21:30 on branch trunk — tests: Use dot syntax (user: js, size: 1929) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
24 25 26 27 28 29 30 | @implementation TestsAppDelegate (OFDNSResolverTests) - (void)DNSResolverTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFDNSResolver *resolver = [OFDNSResolver resolver]; OFMutableString *staticHosts = [OFMutableString string]; | | | | | | | | | | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | @implementation TestsAppDelegate (OFDNSResolverTests) - (void)DNSResolverTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFDNSResolver *resolver = [OFDNSResolver resolver]; OFMutableString *staticHosts = [OFMutableString string]; for (OFString *host in resolver.staticHosts) { OFString *IPs; if (staticHosts.length > 0) [staticHosts appendString: @"; "]; IPs = [[resolver.staticHosts objectForKey: host] componentsJoinedByString: @", "]; [staticHosts appendFormat: @"%@=(%@)", host, IPs]; } PRINT(GREEN, @"Static hosts: %@", staticHosts); PRINT(GREEN, @"Name servers: %@", [resolver.nameServers componentsJoinedByString: @", "]); PRINT(GREEN, @"Local domain: %@", resolver.localDomain); PRINT(GREEN, @"Search domains: %@", [resolver.searchDomains componentsJoinedByString: @", "]); PRINT(GREEN, @"Timeout: %lf", resolver.timeout); PRINT(GREEN, @"Max attempts: %u", resolver.maxAttempts); PRINT(GREEN, @"Min number of dots in absolute name: %u", resolver.minNumberOfDotsInAbsoluteName); PRINT(GREEN, @"Uses TCP: %u", resolver.usesTCP); PRINT(GREEN, @"Config reload interval: %lf", resolver.configReloadInterval); [pool drain]; } @end |