1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-22 00:30:45 +08:00

Add test coverage of null users in scoreboard

This commit is contained in:
Dean Herbert
2020-12-28 20:30:08 +09:00
Unverified
parent 447a55ce11
commit 8f0413472c
@@ -90,11 +90,17 @@ namespace osu.Game.Tests.Visual.Online
};
protected override Task<User> ComputeValueAsync(int lookup, CancellationToken token = default)
=> Task.FromResult(new User
{
// tests against failed lookups
if (lookup == 13)
return Task.FromResult<User>(null);
return Task.FromResult(new User
{
Id = lookup,
Username = usernames[lookup % usernames.Length],
});
}
}
}
}