1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:47:28 +08:00
osu-lazer/osu.Game.Tests
Bartłomiej Dach 86588778b1 Implement fallback decoder registration
After the preparatory introduction of LineBufferedReader, it is now
possible to introduce registration of fallback decoders that won't drop
input supplied in the first line of the file.

A fallback decoder is used when the magic in the first line of the file
does not match any of the other known decoders. In such a case,
the fallback decoder is constructed and provided a LineBufferedReader
instance. The process of matching magic only peeks the first non-empty
line, so it is available for re-reading in Decode() using ReadLine().

There can be only one fallback decoder per type; a second attempt of
registering a fallback will result in an exception to avoid bugs.

To address the issue of parsing failing on badly or non-headered files,
set the legacy decoders for Beatmaps and Storyboards as the fallbacks.

Due to non-trivial logic, several new, passing unit tests with possible
edge cases also included.
2019-09-15 01:28:07 +02:00
..
Beatmaps Implement fallback decoder registration 2019-09-15 01:28:07 +02:00
Chat Add parenthesis handling to old link format 2019-09-04 00:21:27 +02:00
NonVisual Enforce frame accuracy for tests 2019-07-10 11:53:34 +09:00
Resources Implement fallback decoder registration 2019-09-15 01:28:07 +02:00
Scores/IO Move ArchiveModelManager import process to async flow 2019-06-10 13:42:22 +09:00
ScrollAlgorithms Update licence header (and remove year) 2019-01-24 17:43:03 +09:00
Skins Migrate decoding to line-buffered reader 2019-09-15 01:28:07 +02:00
Visual Merge pull request #6095 from peppy/fix-test-dummy-api 2019-09-13 22:22:07 +09:00
osu.Game.Tests.csproj Implement fallback decoder registration 2019-09-15 01:28:07 +02:00
WaveformTestBeatmap.cs Migrate decoding to line-buffered reader 2019-09-15 01:28:07 +02:00