mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
A few test fixes
This commit is contained in:
parent
ccaaab318c
commit
a2cf84de54
@ -350,12 +350,14 @@ namespace Wabbajack.Common
|
||||
public static bool operator ==(Extension a, Extension b)
|
||||
{
|
||||
// Super fast comparison because extensions are interned
|
||||
if (a == null && b == null) return true;
|
||||
if (a == null || b == null) return false;
|
||||
return ReferenceEquals(a._extension, b._extension);
|
||||
}
|
||||
|
||||
public static bool operator !=(Extension a, Extension b)
|
||||
{
|
||||
return !ReferenceEquals(a._extension, b._extension);
|
||||
return !(a == b);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,16 +177,16 @@ namespace Wabbajack.VirtualFileSystem.Test
|
||||
|
||||
var state = context.GetPortableState(files);
|
||||
|
||||
var new_context = new Context(Queue);
|
||||
var newContext = new Context(Queue);
|
||||
|
||||
await new_context.IntegrateFromPortable(state,
|
||||
await newContext.IntegrateFromPortable(state,
|
||||
new Dictionary<Hash, AbsolutePath> {{archive.Hash, archive.FullPath.Base}});
|
||||
|
||||
var new_files = new_context.Index.ByHash[Hash.FromBase64("qX0GZvIaTKM=")];
|
||||
var newFiles = newContext.Index.ByHash[Hash.FromBase64("qX0GZvIaTKM=")];
|
||||
|
||||
var close = await new_context.Stage(new_files);
|
||||
var close = await newContext.Stage(newFiles);
|
||||
|
||||
foreach (var file in new_files)
|
||||
foreach (var file in newFiles)
|
||||
Assert.AreEqual("This is a test", await file.StagedPath.ReadAllTextAsync());
|
||||
|
||||
close();
|
||||
|
Loading…
Reference in New Issue
Block a user