Differences From Artifact [1220c3f5ba]:
- File
tests/OFHTTPClientTests.m
— part of check-in
[0319fe1eb9]
at
2017-09-24 21:00:09
on branch trunk
— OFHTTPClient: Rename to -[asyncPerformRequest:]
This makes it clear that the request is handled asynchronously and makes
it possible to reintroduce a synchronous version later. (user: js, size: 3433) [annotate] [blame] [check-ins using]
To Artifact [76843d6944]:
- File tests/OFHTTPClientTests.m — part of check-in [c35ba05bbc] at 2017-09-25 00:02:44 on branch trunk — OFHTTPClient: Add support for passing a context (user: js, size: 3478) [annotate] [blame] [check-ins using]
︙ | |||
90 91 92 93 94 95 96 97 98 99 100 101 102 103 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | + | } @end @implementation TestsAppDelegate (OFHTTPClientTests) - (void)client: (OFHTTPClient *)client didPerformRequest: (OFHTTPRequest *)request response: (OFHTTPResponse *)response_ context: (id)context { response = [response_ retain]; [[OFRunLoop mainRunLoop] stop]; } - (void)HTTPClientTests |
︙ | |||
121 122 123 124 125 126 127 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | - + + | URL = [OFURL URLWithString: [OFString stringWithFormat: @"http://127.0.0.1:%" @PRIu16 "/foo", server->_port]]; TEST(@"-[asyncPerformRequest:]", (client = [OFHTTPClient client]) && R([client setDelegate: self]) && R(request = [OFHTTPRequest requestWithURL: URL]) && |
︙ |