Skip to content

Commit 40ad53b

Browse files
committed
check flat I burns
1 parent 266e522 commit 40ad53b

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

tests/src/toprow.rs

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub fn test() {
269269
# # # # #
270270
# ### ###"##);
271271

272-
for _ in 0..39 {
272+
for _ in 0..40 {
273273
emu.run_until_vblank();
274274
}
275275

@@ -293,4 +293,40 @@ pub fn test() {
293293
## # # # #
294294
# # # # #
295295
# ### ###"##, playfield::get_str(&emu));
296+
297+
// flat I should burn
298+
299+
emu.memory.iram_raw[labels::get("currentPiece") as usize] = 0x12;
300+
emu.memory.iram_raw[labels::get("tetriminoX") as usize] = 0x5;
301+
emu.memory.iram_raw[labels::get("tetriminoY") as usize] = 0x0f;
302+
emu.memory.iram_raw[labels::get("autorepeatY") as usize] = 0;
303+
emu.memory.iram_raw[labels::get("vramRow") as usize] = 0;
304+
305+
playfield::clear(&mut emu);
306+
playfield::set_str(&mut emu, r##"##########"##);
307+
308+
for _ in 0..48 {
309+
emu.run_until_vblank();
310+
}
311+
312+
assert_eq!(r##"
313+
314+
315+
316+
317+
318+
319+
320+
321+
322+
323+
324+
325+
326+
327+
328+
329+
330+
331+
####"##, playfield::get_str(&emu));
296332
}

0 commit comments

Comments
 (0)