[test] Switch to C++ HTTP server

This commit is contained in:
Juha Alanen
2020-01-14 15:25:36 +02:00
parent ad18b0d789
commit b0e16ec9cb
5 changed files with 232 additions and 6 deletions

View File

@@ -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,