mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix bugs in BSA tests after async IO conversion
This commit is contained in:
parent
e47f80eff6
commit
619da2fa86
@ -141,22 +141,22 @@ namespace Compression.BSA.Test
|
||||
|
||||
|
||||
await a.Files.Zip(b.Files, (ai, bi) => (ai, bi))
|
||||
.PMap(Queue, pair =>
|
||||
.PMap(Queue, async pair =>
|
||||
{
|
||||
Assert.Equal(pair.ai.State.ToJson(), pair.bi.State.ToJson());
|
||||
//Console.WriteLine($" - {pair.ai.Path}");
|
||||
Assert.Equal(pair.ai.Path, pair.bi.Path);
|
||||
//Equal(pair.ai.Compressed, pair.bi.Compressed);
|
||||
Assert.Equal(pair.ai.Size, pair.bi.Size);
|
||||
Assert.Equal(GetData(pair.ai), GetData(pair.bi));
|
||||
Assert.Equal(await GetData(pair.ai), await GetData(pair.bi));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static byte[] GetData(IFile pairAi)
|
||||
private static async ValueTask<byte[]> GetData(IFile pairAi)
|
||||
{
|
||||
using var ms = new MemoryStream();
|
||||
pairAi.CopyDataTo(ms);
|
||||
await using var ms = new MemoryStream();
|
||||
await pairAi.CopyDataTo(ms);
|
||||
return ms.ToArray();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user