예제 #1
0
        public void IsDescendant_WithNullAncestor_IsFalse()
        {
            m_Transform1.SetParent(m_Transform0);

            TransformCache ancestor = null;

            Assert.IsFalse(m_Transform0.IsDescendant(ancestor), "Null ancestor should return false");
        }
예제 #2
0
        public void IsDescendant_WithGrandParentAsAncestor_IsTrue()
        {
            m_Transform1.SetParent(m_Transform0);
            m_Transform2.SetParent(m_Transform1);

            Assert.IsTrue(m_Transform2.IsDescendant(m_Transform0), "Grand parent should return true");
        }
예제 #3
0
        public void IsDescendant_WithDirectParentAsAncestor_IsTrue()
        {
            m_Transform1.SetParent(m_Transform0);

            Assert.IsTrue(m_Transform1.IsDescendant(m_Transform0), "Direct parent should return true");
        }