[PATCH] D112751: [llvm] [Support] Add HTTP Client Support library.

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 5 07:35:41 PDT 2021


labath added a comment.

I think this is as good as it can get. What you do after that -- I don't know.

It wasn't clear to me whether you forgot about the `mockHTTPClientBrokenConnectionTest` part, or chose not to do that, but I added an additional comment to describe how I would do this.



================
Comment at: llvm/lib/Support/HTTPClient.cpp:29
+
+HTTPResponseHandler::~HTTPResponseHandler() {}
+
----------------
`= default`


================
Comment at: llvm/unittests/Support/HTTPClient.cpp:140-141
+  using HTTPClient::perform;
+  Error perform(const HTTPRequest Request,
+                HTTPResponseHandler &Handler) override {
+    if (Error Err = Handler.handleStatusCode(200))
----------------
`MOCK_METHOD2(perform, Error(HTTPRequest, HTTPResponseHandler))`, and then just set expectations in the test. The entire `MockHTTPResponseHandler` business can go away.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112751/new/

https://reviews.llvm.org/D112751



More information about the llvm-commits mailing list