go through more test data

This commit is contained in:
Max Bradbury 2020-04-18 15:02:27 +01:00
parent 9234ed1c63
commit 7c76a9d3d2
1 changed files with 14 additions and 6 deletions

View File

@ -353,11 +353,12 @@ fn test_bitsy_omnibus() {
// fails because of sprite colours but also because a tile contains "NaN" // fails because of sprite colours but also because a tile contains "NaN"
"src/test-resources/omnibus/DA88C287.bitsy.txt".to_string(), "src/test-resources/omnibus/DA88C287.bitsy.txt".to_string(),
// SET instead of ROOM? todo investigate
"src/test-resources/omnibus/1998508E.bitsy.txt".to_string(),
"src/test-resources/omnibus/046871F8.bitsy.txt".to_string(),
// not sure about this one but it uses room wall array // not sure about this one but it uses room wall array
"src/test-resources/omnibus/748F77B5.bitsy.txt".to_string(), "src/test-resources/omnibus/748F77B5.bitsy.txt".to_string(),
// this also has a "SET" instead of a room - what? todo investigate
// and the SET has no palette? is this allowed?
"src/test-resources/omnibus/1998508E.bitsy.txt".to_string(),
// bad game data // bad game data
"src/test-resources/omnibus/14C48FA0.bitsy.txt".to_string(), "src/test-resources/omnibus/14C48FA0.bitsy.txt".to_string(),
@ -367,12 +368,19 @@ fn test_bitsy_omnibus() {
// this one has font data appended to the end of the game data - is this valid? // this one has font data appended to the end of the game data - is this valid?
"src/test-resources/omnibus/4B4EB988.bitsy.txt".to_string(), "src/test-resources/omnibus/4B4EB988.bitsy.txt".to_string(),
// one of the dialogues has a trailing space - this should be allowed I think // one of the dialogues has a trailing space - todo this should be allowed I think
"src/test-resources/omnibus/11018B25.bitsy.txt".to_string(), "src/test-resources/omnibus/11018B25.bitsy.txt".to_string(),
"src/test-resources/omnibus/FEC6E602.bitsy.txt".to_string(), "src/test-resources/omnibus/FEC6E602.bitsy.txt".to_string(),
"src/test-resources/omnibus/3E8C3022.bitsy.txt".to_string(),
// has an ending position of -1 // has an ending position of -1
"src/test-resources/omnibus/593BD9A6.bitsy.txt".to_string(), "src/test-resources/omnibus/593BD9A6.bitsy.txt".to_string(),
// extra line between dialogues
"src/test-resources/omnibus/DB59A848.bitsy.txt".to_string(),
// I guess room palette used to be optional in early versions of bitsy -- todo fix
"src/test-resources/omnibus/8FEDB06B.bitsy.txt".to_string(),
]; ];
let mut passes = 0; let mut passes = 0;
@ -386,12 +394,12 @@ fn test_bitsy_omnibus() {
if ! nice_name.contains("bitsy") || acceptable_failures.contains(&nice_name) { if ! nice_name.contains("bitsy") || acceptable_failures.contains(&nice_name) {
skips += 1; skips += 1;
println!("Skipping: {}", nice_name); // println!("Skipping: {}", nice_name);
println!("Skipped. {} passes, {} skips.", passes, skips); println!("Skipped. {} passes, {} skips.", passes, skips);
continue; continue;
} }
println!("\nTesting: {}...", path.display()); println!("Testing: {}...", path.display());
let game_data = std::fs::read_to_string(path).unwrap(); let game_data = std::fs::read_to_string(path).unwrap();
let game = Game::from(game_data.clone()); let game = Game::from(game_data.clone());
assert_eq!(game.to_string().trim(), game_data.trim()); assert_eq!(game.to_string().trim(), game_data.trim());