public async Task HashExternal64Async() { long hash; using (HashedStream hs = new HashedStream(GetFileStream())) { hash = await SpookyHasher.SpookyHash64Async(hs); Assert.Equal(hash, hs.ReadHash64); } using (FileStream fs = GetFileStream()) { Assert.Equal((ulong)hash, await fs.SpookyHash64Async(0xDEADBEEFDEADBEEF)); } using (FileStream fs = GetFileStream()) { Assert.Equal(hash, unchecked (await fs.SpookyHash64Async((long)0xDEADBEEFDEADBEEF))); } }
public void NullStreamU32() { Assert.Throws <ArgumentNullException>("stream", () => SpookyHasher.SpookyHash32(null, 1U)); }