summaryrefslogtreecommitdiff
path: root/test/storage/local_file_source.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/storage/local_file_source.test.cpp')
-rw-r--r--test/storage/local_file_source.test.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/storage/local_file_source.test.cpp b/test/storage/local_file_source.test.cpp
index e1756f8e7d..45c8c54d91 100644
--- a/test/storage/local_file_source.test.cpp
+++ b/test/storage/local_file_source.test.cpp
@@ -1,4 +1,5 @@
#include <mbgl/storage/local_file_source.hpp>
+#include <mbgl/storage/resource.hpp>
#include <mbgl/util/platform.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -21,12 +22,13 @@ std::string toAbsoluteURL(const std::string& fileName) {
using namespace mbgl;
TEST(LocalFileSource, AcceptsURL) {
- EXPECT_TRUE(LocalFileSource::acceptsURL("file://empty"));
- EXPECT_TRUE(LocalFileSource::acceptsURL("file:///test"));
- EXPECT_FALSE(LocalFileSource::acceptsURL("flie://foo"));
- EXPECT_FALSE(LocalFileSource::acceptsURL("file:"));
- EXPECT_FALSE(LocalFileSource::acceptsURL("style.json"));
- EXPECT_FALSE(LocalFileSource::acceptsURL(""));
+ LocalFileSource fs;
+ EXPECT_TRUE(fs.canRequest(Resource::style("file://empty")));
+ EXPECT_TRUE(fs.canRequest(Resource::style("file:///test")));
+ EXPECT_FALSE(fs.canRequest(Resource::style("flie://foo")));
+ EXPECT_FALSE(fs.canRequest(Resource::style("file:")));
+ EXPECT_FALSE(fs.canRequest(Resource::style("style.json")));
+ EXPECT_FALSE(fs.canRequest(Resource::style("")));
}
TEST(LocalFileSource, EmptyFile) {