Commit Graph

14 Commits

Author SHA1 Message Date
f7d9fb094e Reword & clarify comments 2021-05-04 22:59:10 +02:00
9734758237 Simplify test case further 2021-05-04 22:48:57 +02:00
45c0b74151 Use LINQ select for data assigning for simplicity
To avoid having to read through all of frames and ensure nothing is failing there
2021-05-04 23:41:50 +03:00
4ceb9b1562 Avoid randomizing and overestimating logic with simple hardcoding
Not sure what was in my mind while I was pushing that..
2021-05-04 23:36:50 +03:00
e00af3e71d Add test coverage 2021-05-04 09:45:59 +03:00
57ba7b7cbb Partially revert the changes of CurrentFrame and NextFrame for compatibility
Making those always non-null is postponed as when a replay's frame contains keypress the behavior is changed.
Previously, the key is pressed at the time of the first frame. But using non-null frames means the key is pressed at negative infinity.
However, I think the new way of always using non-null frames makes the client code so I plan to bundle the change to more breaking changes.
2021-04-13 15:55:23 +09:00
359fae895f Rename property 2021-04-12 18:50:25 +09:00
3c28c09ab5 Add more FramedReplayInputHandler tests 2021-04-12 16:18:35 +09:00
e19e8ff2a3 Rewrite FramedReplayInputHandler for robustness
This commit changes the semantics of `CurrentFrame` and `NextFrame` of the class.
The ordering of `NextFrame.Time` and `CurrentFrame.Time` was dependent on the current direction.
Now, it should always satisfy `CurrentFrame.Time <= CurrentTime <= NextFrame.Time` except at the start/end.
This change, however, doesn't break existing deriving classes if the template code pattern usage of interpolation is used.
The deriving class code can be simplified due to the elimination of nullable types. I didn't include those changes in this commit.

I removed `StreamingFramedReplayInputHandlerTest` for now, as it is almost-duplicate of `FramedReplayInputHandlerTest`. I'll include more tests in later commits.

This commit fixes #6150.
2021-04-12 16:18:11 +09:00
0e2ccac33b Add spaces to comments 2020-05-04 18:36:24 -07:00
ccc8aa6fa4 Apply brace style. 2019-11-11 20:13:13 +08:00
5e2adf59be Enforce frame accuracy for tests 2019-07-10 11:53:34 +09:00
bd53a96507 Ensure tests cannot run forever 2019-07-10 11:52:55 +09:00
2a3601e43b Fix test class filename case 2019-07-10 11:42:30 +09:00