1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 16:32:54 +08:00

Improve variable names

This commit is contained in:
Dean Herbert 2018-01-09 12:44:52 +09:00
parent a3f05ca9ec
commit 722eb2515f

View File

@ -237,7 +237,7 @@ namespace osu.Game.Tests.Visual
nextRandom(); nextRandom();
AddAssert("ensure repeat", () => selectedSets.Contains(carousel.SelectedBeatmapSet)); AddAssert("ensure repeat", () => selectedSets.Contains(carousel.SelectedBeatmapSet));
AddStep("Add set with 100 difficulties", () => carousel.UpdateBeatmapSet(createTestBeatmapSetWith100Difficulties(set_count + 1))); AddStep("Add set with 100 difficulties", () => carousel.UpdateBeatmapSet(createTestBeatmapSetWithManyDifficulties(set_count + 1)));
AddStep("Filter Extra", () => carousel.Filter(new FilterCriteria { SearchText = "Extra 10" }, false)); AddStep("Filter Extra", () => carousel.Filter(new FilterCriteria { SearchText = "Extra 10" }, false));
checkInvisibleDifficultiesUnselectable(); checkInvisibleDifficultiesUnselectable();
checkInvisibleDifficultiesUnselectable(); checkInvisibleDifficultiesUnselectable();
@ -353,26 +353,26 @@ namespace osu.Game.Tests.Visual
} }
} }
private BeatmapSetInfo createTestBeatmapSet(int i) private BeatmapSetInfo createTestBeatmapSet(int id)
{ {
return new BeatmapSetInfo return new BeatmapSetInfo
{ {
ID = i, ID = id,
OnlineBeatmapSetID = i, OnlineBeatmapSetID = id,
Hash = new MemoryStream(Encoding.UTF8.GetBytes(Guid.NewGuid().ToString())).ComputeMD5Hash(), Hash = new MemoryStream(Encoding.UTF8.GetBytes(Guid.NewGuid().ToString())).ComputeMD5Hash(),
Metadata = new BeatmapMetadata Metadata = new BeatmapMetadata
{ {
OnlineBeatmapSetID = i, OnlineBeatmapSetID = id,
// Create random metadata, then we can check if sorting works based on these // Create random metadata, then we can check if sorting works based on these
Artist = $"peppy{i.ToString().PadLeft(6, '0')}", Artist = $"peppy{id.ToString().PadLeft(6, '0')}",
Title = $"test set #{i}!", Title = $"test set #{id}!",
AuthorString = string.Concat(Enumerable.Repeat((char)('z' - Math.Min(25, i - 1)), 5)) AuthorString = string.Concat(Enumerable.Repeat((char)('z' - Math.Min(25, id - 1)), 5))
}, },
Beatmaps = new List<BeatmapInfo>(new[] Beatmaps = new List<BeatmapInfo>(new[]
{ {
new BeatmapInfo new BeatmapInfo
{ {
OnlineBeatmapID = i * 10, OnlineBeatmapID = id * 10,
Path = "normal.osu", Path = "normal.osu",
Version = "Normal", Version = "Normal",
StarDifficulty = 2, StarDifficulty = 2,
@ -383,7 +383,7 @@ namespace osu.Game.Tests.Visual
}, },
new BeatmapInfo new BeatmapInfo
{ {
OnlineBeatmapID = i * 10 + 1, OnlineBeatmapID = id * 10 + 1,
Path = "hard.osu", Path = "hard.osu",
Version = "Hard", Version = "Hard",
StarDifficulty = 5, StarDifficulty = 5,
@ -394,7 +394,7 @@ namespace osu.Game.Tests.Visual
}, },
new BeatmapInfo new BeatmapInfo
{ {
OnlineBeatmapID = i * 10 + 2, OnlineBeatmapID = id * 10 + 2,
Path = "insane.osu", Path = "insane.osu",
Version = "Insane", Version = "Insane",
StarDifficulty = 6, StarDifficulty = 6,
@ -407,20 +407,20 @@ namespace osu.Game.Tests.Visual
}; };
} }
private BeatmapSetInfo createTestBeatmapSetWith100Difficulties(int i) private BeatmapSetInfo createTestBeatmapSetWithManyDifficulties(int id)
{ {
var toReturn = new BeatmapSetInfo var toReturn = new BeatmapSetInfo
{ {
ID = i, ID = id,
OnlineBeatmapSetID = i, OnlineBeatmapSetID = id,
Hash = new MemoryStream(Encoding.UTF8.GetBytes(Guid.NewGuid().ToString())).ComputeMD5Hash(), Hash = new MemoryStream(Encoding.UTF8.GetBytes(Guid.NewGuid().ToString())).ComputeMD5Hash(),
Metadata = new BeatmapMetadata Metadata = new BeatmapMetadata
{ {
OnlineBeatmapSetID = i, OnlineBeatmapSetID = id,
// Create random metadata, then we can check if sorting works based on these // Create random metadata, then we can check if sorting works based on these
Artist = $"peppy{i.ToString().PadLeft(6, '0')}", Artist = $"peppy{id.ToString().PadLeft(6, '0')}",
Title = $"test set #{i}!", Title = $"test set #{id}!",
AuthorString = string.Concat(Enumerable.Repeat((char)('z' - Math.Min(25, i - 1)), 5)) AuthorString = string.Concat(Enumerable.Repeat((char)('z' - Math.Min(25, id - 1)), 5))
}, },
Beatmaps = new List<BeatmapInfo>(), Beatmaps = new List<BeatmapInfo>(),
}; };