mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 14:42:56 +08:00
Add truncation test
This commit is contained in:
parent
7fab1a4337
commit
8efba255c3
@ -127,6 +127,12 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
AddAssert("check no info labels", () => !infoWedge.Info.InfoLabelContainer.Children.Any());
|
AddAssert("check no info labels", () => !infoWedge.Info.InfoLabelContainer.Children.Any());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void testTruncation()
|
||||||
|
{
|
||||||
|
selectBeatmap(createLongMetadata());
|
||||||
|
}
|
||||||
|
|
||||||
private void selectBeatmap([CanBeNull] IBeatmap b)
|
private void selectBeatmap([CanBeNull] IBeatmap b)
|
||||||
{
|
{
|
||||||
BeatmapInfoWedge.BufferedWedgeInfo infoBefore = null;
|
BeatmapInfoWedge.BufferedWedgeInfo infoBefore = null;
|
||||||
@ -166,6 +172,25 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IBeatmap createLongMetadata()
|
||||||
|
{
|
||||||
|
return new Beatmap
|
||||||
|
{
|
||||||
|
BeatmapInfo = new BeatmapInfo
|
||||||
|
{
|
||||||
|
Metadata = new BeatmapMetadata
|
||||||
|
{
|
||||||
|
AuthorString = $"WWWWWWWWWWWWWWW",
|
||||||
|
Artist = $"Verrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrry long Artist",
|
||||||
|
Source = $"Verrrrry long Source",
|
||||||
|
Title = $"Verrrrry long Title"
|
||||||
|
},
|
||||||
|
Version = $"Verrrrrrrrrrrrrrrrrrrrrrrrrrrrry long Version",
|
||||||
|
Status = BeatmapSetOnlineStatus.Graveyard,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private class TestBeatmapInfoWedge : BeatmapInfoWedge
|
private class TestBeatmapInfoWedge : BeatmapInfoWedge
|
||||||
{
|
{
|
||||||
public new BufferedWedgeInfo Info => base.Info;
|
public new BufferedWedgeInfo Info => base.Info;
|
||||||
|
Loading…
Reference in New Issue
Block a user