Ejemplo n.º 1
0
        public void HashCodeGenerationWorksCorrectly()
        {
            HashSet <int> hashCodes = new HashSet <int>();
            Matrix1x2     value     = new Matrix1x2(1);

            for (int i = 2; i <= 100; i++)
            {
                Assert.True(hashCodes.Add(value.GetHashCode()), "Unique hash code generation failure.");

                value *= i;
            }
        }
Ejemplo n.º 2
0
        public void HashCodeGenerationWorksCorrectly()
        {
            HashSet<int> hashCodes = new HashSet<int>();
            Matrix1x2 value = new Matrix1x2(1);

            for (int i = 2; i <= 100; i++)
            {
                if (!hashCodes.Add(value.GetHashCode()))
                {
                    Assert.Fail("Unique hash code generation failure.");
                }

                value *= i;
            }
        }