From 10f7af19ce1ec61f37459f9cd75e2a0c89a0c790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Tue, 17 Oct 2017 14:00:52 -0700 Subject: [core] correctly alter sprite URLs when attaching sprite.png/sprite.json filenames --- test/storage/resource.test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/storage') diff --git a/test/storage/resource.test.cpp b/test/storage/resource.test.cpp index 5a27aa98a5..083134c4d0 100644 --- a/test/storage/resource.test.cpp +++ b/test/storage/resource.test.cpp @@ -115,6 +115,10 @@ TEST(Resource, SpriteImage) { Resource resource = Resource::spriteImage("http://example.com/sprite", 2.0); EXPECT_EQ(Resource::Kind::SpriteImage, resource.kind); EXPECT_EQ("http://example.com/sprite@2x.png", resource.url); + + Resource paramResource = Resource::spriteImage("http://example.com/sprite?query=true", 2.0); + EXPECT_EQ(Resource::Kind::SpriteImage, paramResource.kind); + EXPECT_EQ("http://example.com/sprite@2x.png?query=true", paramResource.url); } TEST(Resource, Image) { @@ -129,4 +133,8 @@ TEST(Resource, SpriteJSON) { Resource resource = Resource::spriteJSON("http://example.com/sprite", 2.0); EXPECT_EQ(Resource::Kind::SpriteJSON, resource.kind); EXPECT_EQ("http://example.com/sprite@2x.json", resource.url); + + Resource paramResource = Resource::spriteJSON("http://example.com/sprite?query=true", 2.0); + EXPECT_EQ(Resource::Kind::SpriteJSON, paramResource.kind); + EXPECT_EQ("http://example.com/sprite@2x.json?query=true", paramResource.url); } -- cgit v1.2.1