Skip to content

Commit

Permalink
added a test to test.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 22, 2024
1 parent 78f6814 commit f425c4e
Show file tree
Hide file tree
Showing 16 changed files with 159 additions and 12 deletions.
34 changes: 34 additions & 0 deletions tests/expected/configured/sdf_spr_cmp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"another_bicycle": {
"height": 21,
"pixelRatio": 1,
"width": 21,
"x": 26,
"y": 22,
"sdf": true
},
"bear": {
"height": 22,
"pixelRatio": 1,
"width": 22,
"x": 26,
"y": 0,
"sdf": true
},
"bicycle": {
"height": 21,
"pixelRatio": 1,
"width": 21,
"x": 0,
"y": 26,
"sdf": true
},
"sub/circle": {
"height": 26,
"pixelRatio": 1,
"width": 26,
"x": 0,
"y": 0,
"sdf": true
}
}
Binary file added tests/expected/configured/sdf_spr_cmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tests/expected/configured/sdf_spr_cmp.png.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/output/configured/sdf_spr_cmp.png: PNG image data, 48 x 47, 8-bit gray+alpha, non-interlaced
34 changes: 34 additions & 0 deletions tests/expected/configured/sdf_spr_cmp_2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"another_bicycle": {
"height": 36,
"pixelRatio": 2,
"width": 36,
"x": 84,
"y": 0,
"sdf": true
},
"bear": {
"height": 38,
"pixelRatio": 2,
"width": 38,
"x": 46,
"y": 0,
"sdf": true
},
"bicycle": {
"height": 36,
"pixelRatio": 2,
"width": 36,
"x": 84,
"y": 36,
"sdf": true
},
"sub/circle": {
"height": 46,
"pixelRatio": 2,
"width": 46,
"x": 0,
"y": 0,
"sdf": true
}
}
Binary file added tests/expected/configured/sdf_spr_cmp_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tests/expected/configured/sdf_spr_cmp_2.png.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/output/configured/sdf_spr_cmp_2.png: PNG image data, 120 x 72, 8-bit gray+alpha, non-interlaced
10 changes: 10 additions & 0 deletions tests/expected/configured/sdf_spr_mysrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"bicycle": {
"height": 36,
"pixelRatio": 2,
"width": 36,
"x": 0,
"y": 0,
"sdf": true
}
}
Binary file added tests/expected/configured/sdf_spr_mysrc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tests/expected/configured/sdf_spr_mysrc.png.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/output/configured/sdf_spr_mysrc.png: PNG image data, 36 x 36, 8-bit gray+alpha, non-interlaced
26 changes: 26 additions & 0 deletions tests/expected/configured/sdf_spr_src1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"another_bicycle": {
"height": 21,
"pixelRatio": 1,
"width": 21,
"x": 26,
"y": 22,
"sdf": true
},
"bear": {
"height": 22,
"pixelRatio": 1,
"width": 22,
"x": 26,
"y": 0,
"sdf": true
},
"sub/circle": {
"height": 26,
"pixelRatio": 1,
"width": 26,
"x": 0,
"y": 0,
"sdf": true
}
}
Binary file added tests/expected/configured/sdf_spr_src1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tests/expected/configured/sdf_spr_src1.png.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/output/configured/sdf_spr_src1.png: PNG image data, 48 x 43, 8-bit gray+alpha, non-interlaced
26 changes: 26 additions & 0 deletions tests/expected/configured/sdf_spr_src1_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"another_bicycle": {
"height": 36,
"pixelRatio": 2,
"width": 36,
"x": 84,
"y": 0,
"sdf": true
},
"bear": {
"height": 38,
"pixelRatio": 2,
"width": 38,
"x": 46,
"y": 0,
"sdf": true
},
"sub/circle": {
"height": 46,
"pixelRatio": 2,
"width": 46,
"x": 0,
"y": 0,
"sdf": true
}
}
Binary file added tests/expected/configured/sdf_spr_src1_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tests/expected/configured/sdf_spr_src1_.png.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/output/configured/sdf_spr_src1_.png: PNG image data, 120 x 46, 8-bit gray+alpha, non-interlaced
36 changes: 24 additions & 12 deletions tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -357,18 +357,30 @@ test_png pmt_0_0_0 pmt/0/0/0
test_png pmt2_0_0_0 pmt2/0/0/0 # HTTP pmtiles

# Test sprites
test_jsn spr_src1 sprite/src1.json
test_png spr_src1 sprite/src1.png
test_jsn spr_src1_2x sprite/[email protected]
test_png spr_src1_2x sprite/[email protected]
test_jsn spr_mysrc sprite/mysrc.json
test_png spr_mysrc sprite/mysrc.png
test_jsn spr_mysrc_2x sprite/[email protected]
test_png spr_mysrc_2x sprite/[email protected]
test_jsn spr_cmp sprite/src1,mysrc.json
test_png spr_cmp sprite/src1,mysrc.png
test_jsn spr_cmp_2x sprite/src1,[email protected]
test_png spr_cmp_2x sprite/src1,[email protected]
test_jsn spr_src1 sprite/src1.json
test_jsn sdf_spr_src1 sdf_sprite/src1.json
test_png spr_src1 sprite/src1.png
test_png sdf_spr_src1 sdf_sprite/src1.png
test_jsn spr_src1_2x sprite/[email protected]
test_jsn sdf_spr_src1_ sdf_sprite/[email protected]
test_png spr_src1_2x sprite/[email protected]
test_png sdf_spr_src1_ sdf_sprite/[email protected]
test_jsn spr_mysrc sprite/mysrc.json
test_jsn sdf_spr_mysrc sdf_sprite/mysrc.json
test_png spr_mysrc sprite/mysrc.png
test_png sdf_spr_mysrc sdf_sprite/mysrc.png
test_jsn spr_mysrc_2x sprite/[email protected]
test_jsn sdf_spr_mysrc sdf_sprite/[email protected]
test_png spr_mysrc_2x sprite/[email protected]
test_png sdf_spr_mysrc sdf_sprite/[email protected]
test_jsn spr_cmp sprite/src1,mysrc.json
test_jsn sdf_spr_cmp sdf_sprite/src1,mysrc.json
test_png spr_cmp sprite/src1,mysrc.png
test_png sdf_spr_cmp sdf_sprite/src1,mysrc.png
test_jsn spr_cmp_2x sprite/src1,[email protected]
test_jsn sdf_spr_cmp_2 sdf_sprite/src1,[email protected]
test_png spr_cmp_2x sprite/src1,[email protected]
test_png sdf_spr_cmp_2 sdf_sprite/src1,[email protected]

# Test fonts
test_font font_1 font/Overpass%20Mono%20Light/0-255
Expand Down

0 comments on commit f425c4e

Please sign in to comment.