1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 08:27:49 +08:00

Clean up TestSceneDrumRollJudgements

This commit is contained in:
Dean Herbert 2023-06-07 13:30:04 +09:00
parent 56758afeed
commit c276b728ec

View File

@ -15,8 +15,6 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
[Test] [Test]
public void TestHitAllDrumRoll() public void TestHitAllDrumRoll()
{ {
const double hit_time = 1000;
PerformTest(new List<ReplayFrame> PerformTest(new List<ReplayFrame>
{ {
new TaikoReplayFrame(0), new TaikoReplayFrame(0),
@ -24,11 +22,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
new TaikoReplayFrame(1001), new TaikoReplayFrame(1001),
new TaikoReplayFrame(2000, TaikoAction.LeftCentre), new TaikoReplayFrame(2000, TaikoAction.LeftCentre),
new TaikoReplayFrame(2001), new TaikoReplayFrame(2001),
}, CreateBeatmap(new DrumRoll }, CreateBeatmap(createDrumRoll(false)));
{
StartTime = hit_time,
Duration = 1000
}));
AssertJudgementCount(3); AssertJudgementCount(3);
AssertResult<DrumRollTick>(0, HitResult.SmallBonus); AssertResult<DrumRollTick>(0, HitResult.SmallBonus);
@ -39,18 +33,12 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
[Test] [Test]
public void TestHitSomeDrumRoll() public void TestHitSomeDrumRoll()
{ {
const double hit_time = 1000;
PerformTest(new List<ReplayFrame> PerformTest(new List<ReplayFrame>
{ {
new TaikoReplayFrame(0), new TaikoReplayFrame(0),
new TaikoReplayFrame(2000, TaikoAction.LeftCentre), new TaikoReplayFrame(2000, TaikoAction.LeftCentre),
new TaikoReplayFrame(2001), new TaikoReplayFrame(2001),
}, CreateBeatmap(new DrumRoll }, CreateBeatmap(createDrumRoll(false)));
{
StartTime = hit_time,
Duration = 1000
}));
AssertJudgementCount(3); AssertJudgementCount(3);
AssertResult<DrumRollTick>(0, HitResult.IgnoreMiss); AssertResult<DrumRollTick>(0, HitResult.IgnoreMiss);
@ -61,16 +49,10 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
[Test] [Test]
public void TestHitNoneDrumRoll() public void TestHitNoneDrumRoll()
{ {
const double hit_time = 1000;
PerformTest(new List<ReplayFrame> PerformTest(new List<ReplayFrame>
{ {
new TaikoReplayFrame(0), new TaikoReplayFrame(0),
}, CreateBeatmap(new DrumRoll }, CreateBeatmap(createDrumRoll(false)));
{
StartTime = hit_time,
Duration = 1000
}));
AssertJudgementCount(3); AssertJudgementCount(3);
AssertResult<DrumRollTick>(0, HitResult.IgnoreMiss); AssertResult<DrumRollTick>(0, HitResult.IgnoreMiss);
@ -81,8 +63,6 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
[Test] [Test]
public void TestHitAllStrongDrumRollWithOneKey() public void TestHitAllStrongDrumRollWithOneKey()
{ {
const double hit_time = 1000;
PerformTest(new List<ReplayFrame> PerformTest(new List<ReplayFrame>
{ {
new TaikoReplayFrame(0), new TaikoReplayFrame(0),
@ -90,12 +70,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
new TaikoReplayFrame(1001), new TaikoReplayFrame(1001),
new TaikoReplayFrame(2000, TaikoAction.LeftCentre), new TaikoReplayFrame(2000, TaikoAction.LeftCentre),
new TaikoReplayFrame(2001), new TaikoReplayFrame(2001),
}, CreateBeatmap(new DrumRoll }, CreateBeatmap(createDrumRoll(true)));
{
StartTime = hit_time,
Duration = 1000,
IsStrong = true
}));
AssertJudgementCount(6); AssertJudgementCount(6);
@ -112,19 +87,12 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
[Test] [Test]
public void TestHitSomeStrongDrumRollWithOneKey() public void TestHitSomeStrongDrumRollWithOneKey()
{ {
const double hit_time = 1000;
PerformTest(new List<ReplayFrame> PerformTest(new List<ReplayFrame>
{ {
new TaikoReplayFrame(0), new TaikoReplayFrame(0),
new TaikoReplayFrame(2000, TaikoAction.LeftCentre), new TaikoReplayFrame(2000, TaikoAction.LeftCentre),
new TaikoReplayFrame(2001), new TaikoReplayFrame(2001),
}, CreateBeatmap(new DrumRoll }, CreateBeatmap(createDrumRoll(true)));
{
StartTime = hit_time,
Duration = 1000,
IsStrong = true
}));
AssertJudgementCount(6); AssertJudgementCount(6);
@ -141,8 +109,6 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
[Test] [Test]
public void TestHitAllStrongDrumRollWithBothKeys() public void TestHitAllStrongDrumRollWithBothKeys()
{ {
const double hit_time = 1000;
PerformTest(new List<ReplayFrame> PerformTest(new List<ReplayFrame>
{ {
new TaikoReplayFrame(0), new TaikoReplayFrame(0),
@ -150,12 +116,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
new TaikoReplayFrame(1001), new TaikoReplayFrame(1001),
new TaikoReplayFrame(2000, TaikoAction.LeftCentre, TaikoAction.RightCentre), new TaikoReplayFrame(2000, TaikoAction.LeftCentre, TaikoAction.RightCentre),
new TaikoReplayFrame(2001), new TaikoReplayFrame(2001),
}, CreateBeatmap(new DrumRoll }, CreateBeatmap(createDrumRoll(true)));
{
StartTime = hit_time,
Duration = 1000,
IsStrong = true
}));
AssertJudgementCount(6); AssertJudgementCount(6);
@ -172,19 +133,12 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
[Test] [Test]
public void TestHitSomeStrongDrumRollWithBothKeys() public void TestHitSomeStrongDrumRollWithBothKeys()
{ {
const double hit_time = 1000;
PerformTest(new List<ReplayFrame> PerformTest(new List<ReplayFrame>
{ {
new TaikoReplayFrame(0), new TaikoReplayFrame(0),
new TaikoReplayFrame(2000, TaikoAction.LeftCentre, TaikoAction.RightCentre), new TaikoReplayFrame(2000, TaikoAction.LeftCentre, TaikoAction.RightCentre),
new TaikoReplayFrame(2001), new TaikoReplayFrame(2001),
}, CreateBeatmap(new DrumRoll }, CreateBeatmap(createDrumRoll(true)));
{
StartTime = hit_time,
Duration = 1000,
IsStrong = true
}));
AssertJudgementCount(6); AssertJudgementCount(6);
@ -197,5 +151,12 @@ namespace osu.Game.Rulesets.Taiko.Tests.Judgements
AssertResult<DrumRoll>(0, HitResult.IgnoreHit); AssertResult<DrumRoll>(0, HitResult.IgnoreHit);
AssertResult<StrongNestedHitObject>(2, HitResult.IgnoreHit); AssertResult<StrongNestedHitObject>(2, HitResult.IgnoreHit);
} }
private DrumRoll createDrumRoll(bool strong) => new DrumRoll
{
StartTime = 1000,
Duration = 1000,
IsStrong = strong
};
} }
} }