Reduce calls to LoadTrack by implicitly running on test/dummy classes

This commit is contained in:
Dean Herbert
2022-07-28 17:58:13 +09:00
parent 628a30193f
commit a21aee4e9c
7 changed files with 14 additions and 12 deletions

View File

@ -365,6 +365,11 @@ namespace osu.Game.Tests.Visual
}
else
track = audio?.Tracks.GetVirtual(trackLength);
// We are guaranteed to have a virtual track.
// To ease testability, ensure the track is available from point of construction.
// (Usually this would be done by MusicController for us).
LoadTrack();
}
~ClockBackedTestWorkingBeatmap()