From 05b5144dac62bcb78f526dffb9504eceda95005c Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 15 Aug 2018 13:36:22 +0900 Subject: [PATCH] Add parsing test --- .../Beatmaps/Formats/LegacyBeatmapDecoderTest.cs | 12 ++++++++++++ osu.Game.Tests/Resources/hitobject-combo-offset.osu | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 osu.Game.Tests/Resources/hitobject-combo-offset.osu diff --git a/osu.Game.Tests/Beatmaps/Formats/LegacyBeatmapDecoderTest.cs b/osu.Game.Tests/Beatmaps/Formats/LegacyBeatmapDecoderTest.cs index 400380b407..0a5df0e093 100644 --- a/osu.Game.Tests/Beatmaps/Formats/LegacyBeatmapDecoderTest.cs +++ b/osu.Game.Tests/Beatmaps/Formats/LegacyBeatmapDecoderTest.cs @@ -186,6 +186,18 @@ public void TestDecodeBeatmapColors() } } + [Test] + public void TestDecodeBeatmapComboOffsets() + { + var decoder = new LegacyBeatmapDecoder(); + using (var resStream = Resource.OpenResource("hitobject-combo-offset.osu")) + using (var stream = new StreamReader(resStream)) + { + var beatmap = decoder.Decode(stream); + Assert.AreEqual(3, ((IHasCombo)beatmap.HitObjects[0]).ComboOffset); + } + } + [Test] public void TestDecodeBeatmapHitObjects() { diff --git a/osu.Game.Tests/Resources/hitobject-combo-offset.osu b/osu.Game.Tests/Resources/hitobject-combo-offset.osu new file mode 100644 index 0000000000..4a44d31e22 --- /dev/null +++ b/osu.Game.Tests/Resources/hitobject-combo-offset.osu @@ -0,0 +1,4 @@ +osu file format v14 + +[HitObjects] +255,193,2170,49,0,0:0:0:0: \ No newline at end of file