SyncSetTest: CurlyBracesCtor

This commit is contained in:
vis2k 2021-09-27 15:41:37 +08:00
parent 81b0d89dcd
commit 8233cfd368

View File

@ -56,6 +56,16 @@ public void TestInit()
Assert.That(clientSyncSet, Is.EquivalentTo(new[] { "Hello", "World", "!" }));
}
// test the '= List<int>{1,2,3}' constructor.
// it calls .Add(1); .Add(2); .Add(3) in the constructor.
// (the OnDirty change broke this and we didn't have a test before)
[Test]
public void CurlyBracesConstructor()
{
SyncHashSet<int> set = new SyncHashSet<int>{1,2,3};
Assert.That(set.Count, Is.EqualTo(3));
}
[Test]
public void TestAdd()
{