blob: 911f2073b5a0101382b81690ecd8ffc4b3195134 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#ifndef MBGL_TEST_UTIL
#define MBGL_TEST_UTIL
#include <mbgl/util/image.hpp>
#include <mbgl/util/chrono.hpp>
#include <cstdint>
#include <gtest/gtest.h>
#define SCOPED_TEST(name) \
static class name { \
bool completed = false; \
public: \
void finish() { EXPECT_FALSE(completed) << #name " was already completed."; completed = true; } \
~name() { if (!completed) ADD_FAILURE() << #name " didn't complete."; } \
} name;
namespace mbgl {
class Map;
namespace test {
class Server {
public:
Server(const char* executable);
~Server();
private:
int fd = -1;
};
PremultipliedImage render(Map&);
void checkImage(const std::string& base,
const PremultipliedImage& actual,
double imageThreshold = 0,
double pixelThreshold = 0);
}
}
#endif
|