public void CasEntriesRoundTrip(int casEntryCount, int determinism) { CasEntries casEntries = RandomHelpers.CreateRandomCasEntries(casEntryCount, m_buildXLDeterminism[determinism]); CasEntries roundTrip = casEntries.ToMemoization().FromMemoization(); Assert.Equal(casEntries, roundTrip); }
public void CasEntriesToMemoization(int casEntryCount, int determinism) { CasEntries casEntries = RandomHelpers.CreateRandomCasEntries(casEntryCount, m_buildXLDeterminism[determinism]); ContentHashListWithDeterminism contentHashListWithDeterminism = casEntries.ToMemoization(); Assert.Equal(casEntries.Count, contentHashListWithDeterminism.ContentHashList.Hashes.Count); for (int i = 0; i < casEntries.Count; i++) { Assert.Equal(casEntries[i].ToMemoization(), contentHashListWithDeterminism.ContentHashList.Hashes[i]); } AssertDeterminismEqualEnough(casEntries.Determinism, contentHashListWithDeterminism.Determinism); }