Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed May 9, 2024
1 parent 3f6dce2 commit f9fe38b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/unit/src/flixel/system/replay/FlxReplayTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@ class FlxReplayTest extends FlxTest
{
return new FrameRecord().create(i, null, new MouseRecord(0, 0, mouseState, 0));
}

@Test // #3135
function testGetDuration()
{
var replay = new FlxReplay();
replay.load("987654321\n299km0,0,2,0\n");
// add 1 because frame indices are zero-based
Assert.areEqual(300, replay.getDuration());
}
}

class ReplayState extends FlxState
Expand Down

0 comments on commit f9fe38b

Please sign in to comment.