Skip to content

Commit

Permalink
Fix JRSR close to overflow test (#1669)
Browse files Browse the repository at this point in the history
* Fix JRSR close to overflow test

* ...Oops.
  • Loading branch information
fsvgm777 authored Aug 28, 2023
1 parent 9ef2d56 commit 79cda34
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions tests/TASVideos.MovieParsers.Tests/JrsrTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,25 +268,24 @@ public async Task RerecordsMultiplicity(string contents)
+1 SAVESTATE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab 1
!END
", 0)]
// TODO: disabling these because it failed, and I"m not sure what the expected value should actually be, I think the parser is behaving correctly
// Just short of overflow in frame count. 35791394849161215 is
// (2**31) * 16666667 - 1.
// [DataRow(
//@"JRSR
//!BEGIN header
//!BEGIN events
//+35791394849161215 org.jpc.emulator.peripheral.Keyboard KEYEDGE 28
//!END
//", 0x7fffffff)]
// [DataRow(
//@"JRSR
//!BEGIN header
//!BEGIN events
//+0 OPTION RELATIVE
//+35791394849161214 org.jpc.emulator.peripheral.Keyboard KEYEDGE 28
//+1 org.jpc.emulator.peripheral.Keyboard KEYEDGE 28
//!END
//", 0x7fffffff)]
// Just short of overflow in frame count. 35791394133333330 is
// (2**31) / (60 / 1000000000) rounded down.
[DataRow(
@"JRSR
!BEGIN header
!BEGIN events
+35791394133333330 org.jpc.emulator.peripheral.Keyboard KEYEDGE 28
!END
", 0x7fffffff)]
[DataRow(
@"JRSR
!BEGIN header
!BEGIN events
+0 OPTION RELATIVE
+35791394133333329 org.jpc.emulator.peripheral.Keyboard KEYEDGE 28
+1 org.jpc.emulator.peripheral.Keyboard KEYEDGE 28
!END
", 0x7fffffff)]
public async Task EventTimestamps(string contents, int expected)
{
var result = await ParseFromString(contents);
Expand Down

0 comments on commit 79cda34

Please sign in to comment.