diff --git a/Assets/Mirror/Tests/Editor/SyncSetTest.cs b/Assets/Mirror/Tests/Editor/SyncSetTest.cs index 6cc754a2b..bb106c0ce 100644 --- a/Assets/Mirror/Tests/Editor/SyncSetTest.cs +++ b/Assets/Mirror/Tests/Editor/SyncSetTest.cs @@ -56,6 +56,16 @@ public void TestInit() Assert.That(clientSyncSet, Is.EquivalentTo(new[] { "Hello", "World", "!" })); } + // test the '= List{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 set = new SyncHashSet{1,2,3}; + Assert.That(set.Count, Is.EqualTo(3)); + } + [Test] public void TestAdd() {