[test] Switch to C++ HTTP server
This commit is contained in:
@@ -54,9 +54,14 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace httplib {
|
||||
class Server;
|
||||
}
|
||||
|
||||
namespace mbgl {
|
||||
namespace test {
|
||||
|
||||
@@ -69,6 +74,16 @@ private:
|
||||
int fd = -1;
|
||||
};
|
||||
|
||||
class HttpServer {
|
||||
public:
|
||||
HttpServer();
|
||||
~HttpServer();
|
||||
|
||||
private:
|
||||
std::unique_ptr<httplib::Server> server;
|
||||
std::thread serverThread;
|
||||
};
|
||||
|
||||
void checkImage(const std::string& base,
|
||||
const PremultipliedImage& actual,
|
||||
double imageThreshold = 0,
|
||||
|
||||
Reference in New Issue
Block a user