public void ExceptWithTest() { var setEven = GetOddEvenSet(false); var setOdd = GetOddEvenSet(true); UnsafeHashSet.ExceptWith <int>(setEven, setOdd); // Resulting collection should only contain Even Assert.AreEqual(5, UnsafeHashSet.GetCount(setEven)); UnsafeHashSet.Free(setEven); UnsafeHashSet.Free(setOdd); }
public void UnsafeHashSet_EIU_ExceptWith_Empty() { var setA = new UnsafeHashSet <int>(8, Allocator.TempJob) { }; var setB = new UnsafeHashSet <int>(8, Allocator.TempJob) { }; setA.ExceptWith(setB); ExpectedCount(ref setA, 0); setA.Dispose(); setB.Dispose(); }
public void UnsafeHashSet_EIU_ExceptWith_BxA() { var setA = new UnsafeHashSet <int>(8, Allocator.TempJob) { 0, 1, 2, 3, 4, 5 }; var setB = new UnsafeHashSet <int>(8, Allocator.TempJob) { 3, 4, 5, 6, 7, 8 }; setB.ExceptWith(setA); ExpectedCount(ref setB, 3); Assert.True(setB.Contains(6)); Assert.True(setB.Contains(7)); Assert.True(setB.Contains(8)); setA.Dispose(); setB.Dispose(); }
public void ExceptWith(NativeHashSet <T> other) { UnsafeHashSet.ExceptWith <T>(m_inner, other.m_inner); }