[test] remove crc64 and compare images
boost's crc64 breaks on iOS
This commit is contained in:
committed by
John Firebaugh
parent
c608803ca9
commit
1dd81d9776
21
test/fixtures/util.cpp
vendored
21
test/fixtures/util.cpp
vendored
@@ -8,11 +8,6 @@
|
||||
|
||||
#include <mapbox/pixelmatch.hpp>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wshadow"
|
||||
#include <boost/crc.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <csignal>
|
||||
#include <future>
|
||||
|
||||
@@ -90,22 +85,6 @@ Server::~Server() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// from https://gist.github.com/ArtemGr/997887
|
||||
uint64_t crc64(const char* data, size_t size) {
|
||||
boost::crc_optimal<64, 0x04C11DB7, 0, 0, false, false> crc;
|
||||
crc.process_bytes(data, size);
|
||||
return crc.checksum();
|
||||
}
|
||||
|
||||
uint64_t crc64(const std::string& str) {
|
||||
return crc64(str.data(), str.size());
|
||||
}
|
||||
|
||||
uint64_t crc64(const PremultipliedImage &image) {
|
||||
return crc64(reinterpret_cast<const char*>(image.data.get()), image.size());
|
||||
}
|
||||
|
||||
PremultipliedImage render(Map& map) {
|
||||
std::promise<PremultipliedImage> promise;
|
||||
map.renderStill([&](std::exception_ptr, PremultipliedImage&& image) {
|
||||
|
||||
Reference in New Issue
Block a user