summaryrefslogtreecommitdiff
path: root/test/src/mbgl/test/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/mbgl/test/util.cpp')
-rw-r--r--test/src/mbgl/test/util.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/src/mbgl/test/util.cpp b/test/src/mbgl/test/util.cpp
index 30eea19bdf..71ccc91e06 100644
--- a/test/src/mbgl/test/util.cpp
+++ b/test/src/mbgl/test/util.cpp
@@ -2,7 +2,7 @@
#include <mbgl/util/logging.hpp>
#include <mbgl/util/image.hpp>
-#include <mbgl/util/io.hpp>
+#include <mapbox/io.hpp>
#include <mapbox/pixelmatch.hpp>
@@ -94,14 +94,14 @@ void checkImage(const std::string& base,
double pixelThreshold) {
#if !TEST_READ_ONLY
if (getenv("UPDATE")) {
- util::write_file(base + "/expected.png", encodePNG(actual));
+ mapbox::base::io::writeFile(base + "/expected.png", encodePNG(actual));
return;
}
#endif
std::string expected_image;
try {
- expected_image = util::read_file(base + "/expected.png");
+ expected_image = *mapbox::base::io::readFile(base + "/expected.png");
} catch (std::exception& ex) {
Log::Error(Event::Setup, "Failed to load expected image %s: %s",
(base + "/expected.png").c_str(), ex.what());
@@ -113,7 +113,7 @@ void checkImage(const std::string& base,
#if !TEST_READ_ONLY
- util::write_file(base + "/actual.png", encodePNG(actual));
+ mapbox::base::io::writeFile(base + "/actual.png", encodePNG(actual));
#endif
ASSERT_EQ(expected.size, actual.size);
@@ -128,7 +128,7 @@ void checkImage(const std::string& base,
EXPECT_LE(pixels / (expected.size.width * expected.size.height), imageThreshold);
#if !TEST_READ_ONLY
- util::write_file(base + "/diff.png", encodePNG(diff));
+ mapbox::base::io::writeFile(base + "/diff.png", encodePNG(diff));
#endif
}