mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Move null check outside of the loop
This commit is contained in:
parent
c94f95cc0d
commit
063503f4db
@ -152,17 +152,20 @@ namespace osu.Game.Tests.NonVisual
|
|||||||
Assert.That(!host.Storage.ExistsDirectory(Path.Combine("test-nested", "cache")));
|
Assert.That(!host.Storage.ExistsDirectory(Path.Combine("test-nested", "cache")));
|
||||||
Assert.That(storage.ExistsDirectory(Path.Combine("test-nested", "cache")));
|
Assert.That(storage.ExistsDirectory(Path.Combine("test-nested", "cache")));
|
||||||
|
|
||||||
foreach (var file in osuStorage?.IgnoreFiles ?? Array.Empty<string>())
|
if (osuStorage != null)
|
||||||
|
{
|
||||||
|
foreach (var file in osuStorage.IgnoreFiles)
|
||||||
{
|
{
|
||||||
Assert.That(host.Storage.Exists(file), Is.True);
|
Assert.That(host.Storage.Exists(file), Is.True);
|
||||||
Assert.That(storage.Exists(file), Is.False);
|
Assert.That(storage.Exists(file), Is.False);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var dir in osuStorage?.IgnoreDirectories ?? Array.Empty<string>())
|
foreach (var dir in osuStorage.IgnoreDirectories)
|
||||||
{
|
{
|
||||||
Assert.That(host.Storage.ExistsDirectory(dir), Is.True);
|
Assert.That(host.Storage.ExistsDirectory(dir), Is.True);
|
||||||
Assert.That(storage.ExistsDirectory(dir), Is.False);
|
Assert.That(storage.ExistsDirectory(dir), Is.False);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Assert.That(new StreamReader(host.Storage.GetStream("storage.ini")).ReadToEnd().Contains($"FullPath = {customPath}"));
|
Assert.That(new StreamReader(host.Storage.GetStream("storage.ini")).ReadToEnd().Contains($"FullPath = {customPath}"));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user