mirror of
https://github.com/osukey/osukey.git
synced 2025-05-09 23:57:18 +09:00
Add reorder test
This commit is contained in:
parent
89d22824c3
commit
01108016a7
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -121,6 +122,28 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
assertPositionStep(item9, 8);
|
assertPositionStep(item9, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestItemsReorderedWhenQueueModeChanged()
|
||||||
|
{
|
||||||
|
changeQueueModeStep(QueueMode.AllPlayers);
|
||||||
|
|
||||||
|
var items = new List<PlaylistItem>();
|
||||||
|
|
||||||
|
for (int i = 0; i < 8; i++)
|
||||||
|
items.Add(addItemStep(i <= 3 ? 1 : 2));
|
||||||
|
|
||||||
|
for (int i = 0; i < 8; i++)
|
||||||
|
assertPositionStep(items[i], i);
|
||||||
|
|
||||||
|
changeQueueModeStep(QueueMode.AllPlayersRoundRobin);
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
assertPositionStep(items[i], i * 2); // Items by user 1.
|
||||||
|
assertPositionStep(items[i + 4], i * 2 + 1); // Items by user 2.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a step to create a new playlist item.
|
/// Adds a step to create a new playlist item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user