Skip to content

Commit

Permalink
Fix serialize test for new mGBA
Browse files Browse the repository at this point in the history
Consecutive retro_serialize calls won't return same states for mGBA anymore.
  • Loading branch information
sergystepanov committed Feb 28, 2024
1 parent c699455 commit 17fe1a9
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions pkg/worker/caged/libretro/frontend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,11 @@ func TestStateConcurrency(t *testing.T) {
seed int
}{
{
run: testRun{room: "test_concurrency_00", system: sushi.system, rom: sushi.rom, frames: 120},
run: testRun{room: "test_concurrency_00", system: alwa.system, rom: alwa.rom, frames: 120},
seed: 42,
},
{
run: testRun{room: "test_concurrency_01", system: angua.system, rom: angua.rom, frames: 300},
run: testRun{room: "test_concurrency_01", system: alwa.system, rom: alwa.rom, frames: 300},
seed: 42 + 42,
},
}
Expand Down Expand Up @@ -313,15 +313,6 @@ func TestStateConcurrency(t *testing.T) {
_ = mock.Load()
snapshot2, _ := mock.dumpState()

// Bug or feature?
// When you load a state from the file
// without immediate preceding save,
// it won't be in the loaded state
// even without calling retro_run.
// But if you pause the threads with a debugger
// and run the code step by step, then it will work as expected.
// Possible background emulation?

if snapshot1 != snapshot2 {
t.Errorf("States are inconsistent %v != %v on tick %v\n", snapshot1, snapshot2, i+1)
}
Expand Down

0 comments on commit 17fe1a9

Please sign in to comment.