//-------------------------------------------------------------------------
        public virtual void test_equalsHashCode()
        {
            IntArray a1 = IntArray.of(1, 2);
            IntArray a2 = IntArray.of(1, 2);
            IntArray b  = IntArray.of(1, 2, 3);

            assertEquals(a1.Equals(a1), true);
            assertEquals(a1.Equals(a2), true);
            assertEquals(a1.Equals(b), false);
            assertEquals(a1.Equals(ANOTHER_TYPE), false);
            assertEquals(a1.Equals(null), false);
            assertEquals(a1.GetHashCode(), a2.GetHashCode());
        }
Exemplo n.º 2
0
 public bool Equals(ShaderStageInfo b)
 {
     return(stages == b.stages &&
            source == b.source &&
            customDefines == b.customDefines &&
            specializationData.Equals(b.specializationData));
 }
Exemplo n.º 3
0
 public bool Equals(MeshInfo b)
 {
     return(use32BitIndicies == b.use32BitIndicies &&
            verticies.Equals(b.verticies) &&
            normals.Equals(b.normals) &&
            tangents.Equals(b.tangents) &&
            colors.Equals(b.colors) &&
            uv0.Equals(b.uv0) &&
            uv1.Equals(b.uv1) &&
            triangles.Equals(b.triangles) &&
            submeshs.SequenceEqual <SubMesh>(b.submeshs));
 }
        public void Equals_should_return_true_for_equal_arrays()
        {
            var first = new IntArray();

            first.Collection = new[] { 1, 2, 3 };

            var second = new IntArray();

            second.Collection = new[] { 1, 2, 3 };

            var result = first.Equals(second);

            Assert.True(result);
        }