test(nes): modularize and expand NES conformance test suite (290 tests)

This commit is contained in:
2026-08-27 07:33:56 +02:00
parent 71c747d962
commit 460403d3e1
8 changed files with 543 additions and 187 deletions
+46 -16
View File
@@ -1,19 +1,49 @@
// ponytail: 1-line Misc conformance test suite
// 1-line Misc conformance test suite
const testing = @import("std").testing;
const helpers = @import("helpers.zig");
test "conformance: misc - 240p test suite" { try testing.expect(helpers.countNonBlackPixels(&(try helpers.runRom("240pee/240pee.nes", 60)).bus.ppu.framebuffer) > 1000); }
test "conformance: misc - scanline" { _ = try helpers.runRom("scanline/scanline.nes", 60); }
test "conformance: misc - instr_misc" { _ = try helpers.runRom("instr_misc/instr_misc.nes", 60); }
test "conformance: misc - abs_x_wrap" { _ = try helpers.runRom("instr_misc/rom_singles/01-abs_x_wrap.nes", 60); }
test "conformance: misc - branch_wrap" { _ = try helpers.runRom("instr_misc/rom_singles/02-branch_wrap.nes", 60); }
test "conformance: misc - dummy_reads" { _ = try helpers.runRom("instr_misc/rom_singles/03-dummy_reads.nes", 60); }
test "conformance: misc - dummy_reads_apu" { _ = try helpers.runRom("instr_misc/rom_singles/04-dummy_reads_apu.nes", 60); }
test "conformance: misc - nintendulator" { _ = try helpers.runRom("other/nintendulator.nes", 60); }
test "conformance: misc - fceuxd" { _ = try helpers.runRom("other/fceuxd.nes", 60); }
test "conformance: misc - read2004" { _ = try helpers.runRom("other/read2004.nes", 60); }
test "conformance: misc - blargg_litewall-9" { _ = try helpers.runRom("other/blargg_litewall-9.nes", 60); }
test "conformance: misc - blargg_litewall-2" { _ = try helpers.runRom("other/blargg_litewall-2.nes", 60); }
test "conformance: misc - high-hopes" { _ = try helpers.runRom("other/high-hopes.nes", 60); }
test "conformance: misc - snow" { _ = try helpers.runRom("other/snow.nes", 60); }
test "conformance: misc - SimpleParallaxDemo" { _ = try helpers.runRom("other/SimpleParallaxDemo.nes", 60); }
test "conformance: misc - 240p test suite" {
try testing.expect(helpers.countNonBlackPixels(&(try helpers.runRom("240pee/240pee.nes", 60)).bus.ppu.framebuffer) > 1000);
}
test "conformance: misc - scanline" {
_ = try helpers.runRom("scanline/scanline.nes", 60);
}
test "conformance: misc - instr_misc" {
_ = try helpers.runRom("instr_misc/instr_misc.nes", 60);
}
test "conformance: misc - abs_x_wrap" {
_ = try helpers.runRom("instr_misc/rom_singles/01-abs_x_wrap.nes", 60);
}
test "conformance: misc - branch_wrap" {
_ = try helpers.runRom("instr_misc/rom_singles/02-branch_wrap.nes", 60);
}
test "conformance: misc - dummy_reads" {
_ = try helpers.runRom("instr_misc/rom_singles/03-dummy_reads.nes", 60);
}
test "conformance: misc - dummy_reads_apu" {
_ = try helpers.runRom("instr_misc/rom_singles/04-dummy_reads_apu.nes", 60);
}
test "conformance: misc - nintendulator" {
_ = try helpers.runRom("other/nintendulator.nes", 60);
}
test "conformance: misc - fceuxd" {
_ = try helpers.runRom("other/fceuxd.nes", 60);
}
test "conformance: misc - read2004" {
_ = try helpers.runRom("other/read2004.nes", 60);
}
test "conformance: misc - blargg_litewall-9" {
_ = try helpers.runRom("other/blargg_litewall-9.nes", 60);
}
test "conformance: misc - blargg_litewall-2" {
_ = try helpers.runRom("other/blargg_litewall-2.nes", 60);
}
test "conformance: misc - high-hopes" {
_ = try helpers.runRom("other/high-hopes.nes", 60);
}
test "conformance: misc - snow" {
_ = try helpers.runRom("other/snow.nes", 60);
}
test "conformance: misc - SimpleParallaxDemo" {
_ = try helpers.runRom("other/SimpleParallaxDemo.nes", 60);
}