Skip to content

Commit e1eb12a

Browse files
committed
Added test for 64-bit integer parsing
1 parent 8e5d7fd commit e1eb12a

2 files changed

Lines changed: 117 additions & 0 deletions

File tree

src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,17 @@ mod tests {
232232
}
233233
}
234234

235+
#[test]
236+
fn m212_64_bit_test() -> Result<(), String> {
237+
// This has 64-bit integers in it which previously failed to parse.
238+
match parse_file("src/tests/data/GryffindorM212.t3d".to_string()) {
239+
Ok(_objects) => {
240+
Ok(())
241+
}
242+
Err(error) => {
243+
Err(error)
244+
}
245+
}
246+
}
247+
235248
}

src/tests/data/GryffindorM212.t3d

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
Begin Map
2+
Begin Actor Class=Engine.Brush Name=Brush489
3+
CsgOper=CSG_Add
4+
MainScale=(SheerAxis=SHEER_ZX)
5+
PostScale=(SheerAxis=SHEER_ZX)
6+
Group="None,01 start"
7+
Level=LevelInfo'MyLevel.LevelInfo0'
8+
Tag=Brush
9+
Region=(Zone=LevelInfo'MyLevel.LevelInfo0',iLeaf=-1)
10+
Location=(Y=896,Z=704)
11+
Rotation=(Yaw=16384)
12+
OldRotation=(Yaw=16384)
13+
OldLocation=(Y=896,Z=704)
14+
Begin Brush Name=Model325
15+
Begin PolyList
16+
Begin Polygon Texture=BL_CocaCola.Wall.R1_coca Link=0 LightMapScale=32.000000 SpecialLitChannel=0 SurfaceTag=None
17+
Origin -00032.000004,+00000.000000,-00032.000000
18+
Normal -00000.707107,+00000.000000,-00000.707107
19+
Pan U=0 V=51
20+
TextureU +00000.000000,-00001.000000,+00000.000000
21+
TextureV -00000.707107,+00000.000000,+00000.707107
22+
Vertex -00000.000008,-00256.000000,-00064.000000
23+
Vertex -00064.000000,-00256.000000,+00000.000003
24+
Vertex -00064.000000,+00256.000000,+00000.000003
25+
Vertex -00000.000004,+00256.000000,-00064.000000
26+
SurfaceColor +00000.000000,+00000.000000,+00000.000000,+00000.000000
27+
End Polygon
28+
Begin Polygon Texture=BL_CocaCola.Wall.R1_coca Link=1 LightMapScale=32.000000 SpecialLitChannel=0 SurfaceTag=None
29+
Origin -00064.000000,-00256.000000,-00064.000000
30+
Normal -00001.000000,+00000.000000,+00000.000000
31+
Pan U=0 V=-142
32+
TextureU +00000.000000,+00001.000000,+00000.000000
33+
TextureV +00000.000000,+00000.000000,-00001.000000
34+
Vertex -00064.000000,-00256.000000,-00000.000001
35+
Vertex -00064.000000,-00256.000000,+00064.000000
36+
Vertex -00064.000000,+00256.000000,+00064.000000
37+
Vertex -00064.000000,+00256.000000,-00000.000001
38+
SurfaceColor +00000.000000,+00000.000000,+00000.000000,+00000.000000
39+
End Polygon
40+
Begin Polygon Texture=Skurge.Wall.skurge_Runner Flags=2147483648 Link=2 LightMapScale=32.000000 SpecialLitChannel=0 SurfaceTag=None
41+
Origin -00064.000000,+00256.000000,-00064.000000
42+
Normal +00000.000000,+00001.000000,+00000.000000
43+
TextureU +00001.000000,+00000.000000,+00000.000000
44+
TextureV +00000.000000,+00000.000000,-00001.000000
45+
Vertex -00000.000008,+00256.000000,-00064.000000
46+
Vertex -00064.000000,+00256.000000,-00000.000001
47+
Vertex -00064.000000,+00256.000000,+00064.000000
48+
Vertex +00064.000000,+00256.000000,+00064.000000
49+
Vertex +00064.000000,+00256.000000,-00064.000000
50+
SurfaceColor +00000.000000,+00000.000000,+00000.000000,+00000.000000
51+
End Polygon
52+
Begin Polygon Texture=Skurge.Wall.skurge_Runner Link=3 LightMapScale=32.000000 SpecialLitChannel=0 SurfaceTag=None
53+
Origin +00064.000000,+00256.000000,-00064.000000
54+
Normal +00001.000000,+00000.000000,+00000.000000
55+
TextureU +00000.000000,-00001.000000,+00000.000000
56+
TextureV +00000.000000,+00000.000000,-00001.000000
57+
Vertex +00064.000000,+00256.000000,-00064.000000
58+
Vertex +00064.000000,+00256.000000,+00064.000000
59+
Vertex +00064.000000,-00256.000000,+00064.000000
60+
Vertex +00064.000000,-00256.000000,-00064.000000
61+
SurfaceColor +00000.000000,+00000.000000,+00000.000000,+00000.000000
62+
End Polygon
63+
Begin Polygon Texture=Skurge.Wall.skurge_Runner Flags=2147483648 Link=4 LightMapScale=32.000000 SpecialLitChannel=0 SurfaceTag=None
64+
Origin +00064.000000,-00256.000000,-00064.000000
65+
Normal +00000.000000,-00001.000000,+00000.000000
66+
TextureU -00001.000000,+00000.000000,+00000.000000
67+
TextureV +00000.000000,+00000.000000,-00001.000000
68+
Vertex -00000.000008,-00256.000000,-00064.000000
69+
Vertex +00064.000000,-00256.000000,-00064.000000
70+
Vertex +00064.000000,-00256.000000,+00064.000000
71+
Vertex -00064.000000,-00256.000000,+00064.000000
72+
Vertex -00064.000000,-00256.000000,-00000.000001
73+
SurfaceColor +00000.000000,+00000.000000,+00000.000000,+00000.000000
74+
End Polygon
75+
Begin Polygon Texture=Skurge.Floors.GreyFlagstonefl Link=5 LightMapScale=32.000000 SpecialLitChannel=0 SurfaceTag=None
76+
Origin -00064.000000,+00256.000000,+00064.000000
77+
Normal +00000.000000,+00000.000000,+00001.000000
78+
TextureU +00001.000000,+00000.000000,+00000.000000
79+
TextureV +00000.000000,+00001.000000,+00000.000000
80+
Vertex -00064.000000,+00256.000000,+00064.000000
81+
Vertex -00064.000000,-00256.000000,+00064.000000
82+
Vertex +00064.000000,-00256.000000,+00064.000000
83+
Vertex +00064.000000,+00256.000000,+00064.000000
84+
SurfaceColor +00000.000000,+00000.000000,+00000.000000,+00000.000000
85+
End Polygon
86+
Begin Polygon Texture=BL_CocaCola.Wall.R1_coca Link=6 LightMapScale=32.000000 SpecialLitChannel=0 SurfaceTag=None
87+
Origin -00064.000000,-00256.000000,-00064.000000
88+
Normal +00000.000000,+00000.000000,-00001.000000
89+
TextureU +00001.000000,+00000.000000,+00000.000000
90+
TextureV +00000.000000,-00001.000000,+00000.000000
91+
Vertex -00000.000008,-00256.000000,-00064.000000
92+
Vertex -00000.000008,+00256.000000,-00064.000000
93+
Vertex +00064.000000,+00256.000000,-00064.000000
94+
Vertex +00064.000000,-00256.000000,-00064.000000
95+
SurfaceColor +00000.000000,+00000.000000,+00000.000000,+00000.000000
96+
End Polygon
97+
End PolyList
98+
End Brush
99+
Brush=Model'MyLevel.Model325'
100+
CollisionRadius=256
101+
CollisionWidth=256
102+
CollisionHeight=64
103+
End Actor
104+
End Map

0 commit comments

Comments
 (0)