mirror of
https://github.com/SK-la/Ez2Lazer.git
synced 2026-03-13 11:20:28 +00:00
Adjust tests to pass (and add test coverage of fail case)
This commit is contained in:
@@ -14,26 +14,27 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
|
||||
protected override IResourceStore<byte[]> RulesetResources => new DllResourceStore(Assembly.GetAssembly(typeof(TestSceneOsuHitObjectSamples)));
|
||||
|
||||
[TestCase("normal-hitnormal")]
|
||||
[TestCase("hitnormal")]
|
||||
public void TestDefaultCustomSampleFromBeatmap(string expectedSample)
|
||||
[TestCase("normal-hitnormal2", "normal-hitnormal")]
|
||||
[TestCase("hitnormal", "hitnormal")]
|
||||
public void TestDefaultCustomSampleFromBeatmap(string beatmapSkinSampleName, string userSkinSampleName)
|
||||
{
|
||||
SetupSkins(expectedSample, expectedSample);
|
||||
SetupSkins(beatmapSkinSampleName, userSkinSampleName);
|
||||
|
||||
CreateTestWithBeatmap("osu-hitobject-beatmap-custom-sample-bank.osu");
|
||||
|
||||
AssertBeatmapLookup(expectedSample);
|
||||
AssertBeatmapLookup(beatmapSkinSampleName);
|
||||
}
|
||||
|
||||
[TestCase("normal-hitnormal")]
|
||||
[TestCase("hitnormal")]
|
||||
public void TestDefaultCustomSampleFromUserSkinFallback(string expectedSample)
|
||||
[TestCase("", "normal-hitnormal")]
|
||||
[TestCase("normal-hitnormal", "normal-hitnormal")]
|
||||
[TestCase("", "hitnormal")]
|
||||
public void TestDefaultCustomSampleFromUserSkinFallback(string beatmapSkinSampleName, string userSkinSampleName)
|
||||
{
|
||||
SetupSkins(string.Empty, expectedSample);
|
||||
SetupSkins(beatmapSkinSampleName, userSkinSampleName);
|
||||
|
||||
CreateTestWithBeatmap("osu-hitobject-beatmap-custom-sample-bank.osu");
|
||||
|
||||
AssertUserLookup(expectedSample);
|
||||
AssertUserLookup(userSkinSampleName);
|
||||
}
|
||||
|
||||
[TestCase("normal-hitnormal2")]
|
||||
|
||||
@@ -14,26 +14,27 @@ namespace osu.Game.Rulesets.Taiko.Tests
|
||||
|
||||
protected override IResourceStore<byte[]> RulesetResources => new DllResourceStore(Assembly.GetAssembly(typeof(TestSceneTaikoHitObjectSamples)));
|
||||
|
||||
[TestCase("taiko-normal-hitnormal")]
|
||||
[TestCase("hitnormal")]
|
||||
public void TestDefaultCustomSampleFromBeatmap(string expectedSample)
|
||||
[TestCase("taiko-normal-hitnormal2", "taiko-normal-hitnormal")]
|
||||
[TestCase("hitnormal", "hitnormal")]
|
||||
public void TestDefaultCustomSampleFromBeatmap(string beatmapSkinSampleName, string userSkinSampleName)
|
||||
{
|
||||
SetupSkins(expectedSample, expectedSample);
|
||||
SetupSkins(beatmapSkinSampleName, userSkinSampleName);
|
||||
|
||||
CreateTestWithBeatmap("taiko-hitobject-beatmap-custom-sample-bank.osu");
|
||||
|
||||
AssertBeatmapLookup(expectedSample);
|
||||
AssertBeatmapLookup(beatmapSkinSampleName);
|
||||
}
|
||||
|
||||
[TestCase("taiko-normal-hitnormal")]
|
||||
[TestCase("hitnormal")]
|
||||
public void TestDefaultCustomSampleFromUserSkinFallback(string expectedSample)
|
||||
[TestCase("", "taiko-normal-hitnormal")]
|
||||
[TestCase("taiko-normal-hitnormal", "taiko-normal-hitnormal")]
|
||||
[TestCase("", "hitnormal")]
|
||||
public void TestDefaultCustomSampleFromUserSkinFallback(string beatmapSkinSampleName, string userSkinSampleName)
|
||||
{
|
||||
SetupSkins(string.Empty, expectedSample);
|
||||
SetupSkins(beatmapSkinSampleName, userSkinSampleName);
|
||||
|
||||
CreateTestWithBeatmap("taiko-hitobject-beatmap-custom-sample-bank.osu");
|
||||
|
||||
AssertUserLookup(expectedSample);
|
||||
AssertUserLookup(userSkinSampleName);
|
||||
}
|
||||
|
||||
[TestCase("taiko-normal-hitnormal2")]
|
||||
|
||||
@@ -64,11 +64,9 @@ namespace osu.Game.Tests.Gameplay
|
||||
/// <summary>
|
||||
/// Tests that a hitobject which provides a custom sample set of 2 retrieves the following samples from the beatmap skin:
|
||||
/// normal-hitnormal2
|
||||
/// normal-hitnormal
|
||||
/// hitnormal
|
||||
/// </summary>
|
||||
[TestCase("normal-hitnormal2")]
|
||||
[TestCase("normal-hitnormal")]
|
||||
[TestCase("hitnormal")]
|
||||
public void TestDefaultCustomSampleFromBeatmap(string expectedSample)
|
||||
{
|
||||
@@ -162,7 +160,6 @@ namespace osu.Game.Tests.Gameplay
|
||||
/// Tests that a control point that provides a custom sample of 2 causes <see cref="TestDefaultCustomSampleFromBeatmap"/>.
|
||||
/// </summary>
|
||||
[TestCase("normal-hitnormal2")]
|
||||
[TestCase("normal-hitnormal")]
|
||||
[TestCase("hitnormal")]
|
||||
public void TestControlPointCustomSampleFromBeatmap(string sampleName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user