From 7debb946423276bb5fccec182f796476e018d36d Mon Sep 17 00:00:00 2001 From: LoadEffectiveAddress Date: Thu, 17 Dec 2020 13:59:53 +1300 Subject: [PATCH] Include assertion for unit test --- Octgn.Communication.Test/Utility/UIDTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Octgn.Communication.Test/Utility/UIDTests.cs b/Octgn.Communication.Test/Utility/UIDTests.cs index 22dd6ef..b6814e2 100644 --- a/Octgn.Communication.Test/Utility/UIDTests.cs +++ b/Octgn.Communication.Test/Utility/UIDTests.cs @@ -9,10 +9,12 @@ public class UIDTests { [TestCase] public void NoDuplicates() { + const int reps = 5_000_000; var values = new HashSet(); - for(var i = 0; i < 5000000; i++) { + for(var i = 0; i < reps; i++) { values.Add(UID.Generate(i)); } + Assert.AreEqual(reps, values.Count, "Collision detected"); } } }