Skip to content

Commit 29c04a3

Browse files
committed
Update all tests for template template update(#41)
1 parent 30f52fd commit 29c04a3

File tree

27 files changed

+83
-427
lines changed

27 files changed

+83
-427
lines changed

tests/test_data/map_tests/embedded_tileset/expected.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
image_height=199,
2222
margin=1,
2323
spacing=1,
24+
firstgid=1,
2425
name="tileset",
2526
tile_count=48,
2627
tile_height=32,
2728
tile_width=32,
28-
firstgid=1,
2929
)
3030
},
3131
)

tests/test_data/map_tests/external_tileset_dif_dir/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
tiled_version="1.6.0",
8686
tile_height=32,
8787
tile_width=32,
88+
firstgid=1,
8889
version="1.6",
8990
type="tileset",
9091
grid=tileset.Grid(orientation="orthogonal", width=1, height=1),

tests/test_data/map_tests/hexagonal/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
.resolve(),
144144
image_width=106,
145145
image_height=72,
146+
firstgid=1,
146147
margin=0,
147148
spacing=0,
148149
name="tileset",

tests/test_data/map_tests/no_background_color/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
.resolve(),
2222
image_width=265,
2323
image_height=199,
24+
firstgid=1,
2425
margin=1,
2526
spacing=1,
2627
name="tile_set_image",

tests/test_data/map_tests/no_layers/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
.resolve(),
2323
image_width=265,
2424
image_height=199,
25+
firstgid=1,
2526
margin=1,
2627
spacing=1,
2728
name="tile_set_image",

tests/test_data/map_tests/template/expected.py

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,33 +24,31 @@
2424
type="",
2525
),
2626
tiled_object.Tile(
27-
id=3,
28-
coordinates=common_types.OrderedPair(
29-
46.3682110303692, 112.993321292057
30-
),
27+
id=6,
28+
coordinates=common_types.OrderedPair(46, 136.666666666667),
3129
name="",
3230
rotation=0,
3331
type="",
3432
visible=True,
3533
size=common_types.Size(32, 32),
36-
gid=30,
34+
gid=49,
3735
),
3836
tiled_object.Tile(
39-
id=5,
40-
coordinates=common_types.OrderedPair(116, 145),
37+
id=7,
38+
coordinates=common_types.OrderedPair(141.333333333333, 148),
4139
name="",
4240
rotation=0,
4341
type="",
4442
visible=True,
4543
size=common_types.Size(32, 32),
46-
gid=1,
44+
gid=50,
4745
),
4846
],
4947
)
5048
],
5149
map_size=common_types.Size(8, 6),
5250
next_layer_id=3,
53-
next_object_id=6,
51+
next_object_id=8,
5452
orientation="orthogonal",
5553
render_order="right-down",
5654
tiled_version="1.7.1",
@@ -65,6 +63,7 @@
6563
.resolve(),
6664
image_width=265,
6765
image_height=199,
66+
firstgid=1,
6867
margin=1,
6968
spacing=1,
7069
name="tile_set_image",
@@ -76,15 +75,33 @@
7675
type="tileset",
7776
),
7877
49: tileset.Tileset(
78+
columns=1,
79+
image=Path(Path(__file__).parent / "../../images/tile_04.png")
80+
.absolute()
81+
.resolve(),
82+
image_width=32,
83+
image_height=32,
84+
firstgid=49,
85+
margin=0,
86+
spacing=0,
87+
name="tile_set_image_for_template",
88+
tile_count=1,
89+
tiled_version="1.7.1",
90+
tile_height=32,
91+
tile_width=32,
92+
version="1.6",
93+
type="tileset",
94+
),
95+
50: tileset.Tileset(
7996
columns=0,
8097
margin=0,
8198
spacing=0,
82-
name="tileset_single_image",
99+
name="tile_set_single_image",
83100
grid=tileset.Grid(orientation="orthogonal", width=1, height=1),
84101
tiles={
85102
0: tileset.Tile(
86103
id=0,
87-
image=Path(Path(__file__).parent / "../../images/tile_01.png")
104+
image=Path(Path(__file__).parent / "../../images/tile_02.png")
88105
.absolute()
89106
.resolve(),
90107
image_height=32,
@@ -95,6 +112,7 @@
95112
tiled_version="1.7.1",
96113
tile_height=32,
97114
tile_width=32,
115+
firstgid=50,
98116
type="tileset",
99117
version="1.6",
100118
),

tests/test_data/map_tests/template/map.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@
1010
"objects":[
1111
{
1212
"id":2,
13-
"template":"template.json",
13+
"template":"template-rectangle.json",
1414
"x":98.4987608686521,
1515
"y":46.2385012811358
1616
},
1717
{
18-
"id":3,
19-
"template":"template_tile.json",
20-
"x":46.3682110303692,
21-
"y":112.993321292057
18+
"id":6,
19+
"template":"template-tile-spritesheet.json",
20+
"x":46,
21+
"y":136.666666666667
2222
},
2323
{
24-
"id":5,
25-
"template":"template_tile_image.json",
26-
"x":116,
27-
"y":145
24+
"id":7,
25+
"template":"template-tile-image.json",
26+
"x":141.333333333333,
27+
"y":148
2828
}],
2929
"opacity":1,
3030
"type":"objectgroup",
@@ -33,7 +33,7 @@
3333
"y":0
3434
}],
3535
"nextlayerid":3,
36-
"nextobjectid":6,
36+
"nextobjectid":8,
3737
"orientation":"orthogonal",
3838
"properties":[
3939
{
@@ -76,7 +76,7 @@
7676
},
7777
{
7878
"firstgid":49,
79-
"source":"tileset_single_image.json"
79+
"source":"tile_set_image_for_template.json"
8080
}],
8181
"tilewidth":32,
8282
"type":"map",

tests/test_data/map_tests/template/template_tile_image.json renamed to tests/test_data/map_tests/template/template-tile-image.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"gid":1,
44
"height":32,
5-
"id":4,
5+
"id":7,
66
"name":"",
77
"rotation":0,
88
"type":"",
@@ -12,7 +12,7 @@
1212
"tileset":
1313
{
1414
"firstgid":1,
15-
"source":"tileset_single_image.json"
15+
"source":"tile_set_single_image.json"
1616
},
1717
"type":"template"
1818
}
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{ "object":
22
{
3-
"gid":30,
3+
"gid":1,
44
"height":32,
5-
"id":3,
5+
"id":6,
66
"name":"",
77
"rotation":0,
88
"type":"",
@@ -12,7 +12,7 @@
1212
"tileset":
1313
{
1414
"firstgid":1,
15-
"source":"tileset.json"
15+
"source":"tile_set_image_for_template.json"
1616
},
1717
"type":"template"
1818
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{ "columns":1,
2+
"image":"..\/..\/images\/tile_04.png",
3+
"imageheight":32,
4+
"imagewidth":32,
5+
"margin":0,
6+
"name":"tile_set_image_for_template",
7+
"spacing":0,
8+
"tilecount":1,
9+
"tiledversion":"1.7.1",
10+
"tileheight":32,
11+
"tilewidth":32,
12+
"type":"tileset",
13+
"version":"1.6"
14+
}

tests/test_data/map_tests/template/tileset_single_image.json renamed to tests/test_data/map_tests/template/tile_set_single_image.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
"width":1
77
},
88
"margin":0,
9-
"name":"tileset_single_image",
9+
"name":"tile_set_single_image",
1010
"spacing":0,
1111
"tilecount":1,
1212
"tiledversion":"1.7.1",
1313
"tileheight":32,
1414
"tiles":[
1515
{
1616
"id":0,
17-
"image":"..\/..\/images\/tile_01.png",
17+
"image":"..\/..\/images\/tile_02.png",
1818
"imageheight":32,
1919
"imagewidth":32
2020
}],

tests/test_data/tilesets/image/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
image=Path("../../images/tmw_desert_spacing.png"),
88
image_height=199,
99
image_width=265,
10+
firstgid=1,
1011
margin=1,
1112
spacing=1,
1213
name="tile_set_image",

tests/test_data/tilesets/image_background_color/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
image=Path("../../images/tmw_desert_spacing.png"),
99
image_height=199,
1010
image_width=265,
11+
firstgid=1,
1112
margin=1,
1213
spacing=1,
1314
name="tile_set_image",

tests/test_data/tilesets/image_grid/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
image=Path("../../images/tmw_desert_spacing.png"),
88
image_height=199,
99
image_width=265,
10+
firstgid=1,
1011
margin=1,
1112
spacing=1,
1213
name="tile_set_image",

tests/test_data/tilesets/image_properties/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
image=Path("../../images/tmw_desert_spacing.png"),
99
image_height=199,
1010
image_width=265,
11+
firstgid=1,
1112
margin=1,
1213
spacing=1,
1314
name="tile_set_image",

tests/test_data/tilesets/image_tile_offset/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
image=Path("../../images/tmw_desert_spacing.png"),
99
image_height=199,
1010
image_width=265,
11+
firstgid=1,
1112
margin=1,
1213
spacing=1,
1314
name="tile_set_image",

tests/test_data/tilesets/image_transformations/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
image=Path("../../images/tmw_desert_spacing.png"),
88
image_height=199,
99
image_width=265,
10+
firstgid=1,
1011
margin=1,
1112
spacing=1,
1213
name="tile_set_image",

tests/test_data/tilesets/image_transparent_color/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
image=Path("../../images/tmw_desert_spacing.png"),
99
image_height=199,
1010
image_width=265,
11+
firstgid=1,
1112
margin=1,
1213
spacing=1,
1314
name="tileset",

tests/test_data/tilesets/individual_images/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
tiled_version="1.6.0",
1212
tile_height=32,
1313
tile_width=32,
14+
firstgid=1,
1415
version="1.6",
1516
type="tileset",
1617
grid=tileset.Grid(orientation="orthogonal", width=1, height=1),

tests/test_data/tilesets/terrain/expected.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
tiled_version="1.6.0",
1515
tile_height=32,
1616
tile_width=32,
17+
firstgid=1,
1718
version="1.6",
1819
type="tileset",
1920
wang_sets=[

tests/test_data/tilesets/wangsets/map.json

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)