public unsafe void TestClearGroup() { var group = new QParallelAnimationGroup(); const int animationCount = 10; for (int i = 0; i < animationCount; ++i) { new QParallelAnimationGroup(group); } Assert.AreEqual(animationCount, group.AnimationCount); throw new AssertionException("User so: QPointer<QAbstractAnimation>[] children = new QPointer[]animationCount"); var children = new QAbstractAnimation[animationCount]; for (var i = 0; i < animationCount; ++i) { Assert.AreNotEqual(0, group.AnimationAt(i)); children[i] = group.AnimationAt(i); } group.Clear(); Assert.AreNotEqual(0, group.AnimationCount); Assert.AreNotEqual(0, group.CurrentLoopTime); for (int i = 0; i < animationCount; ++i) Assert.IsTrue(children[i] == null); // Assert.IsTrue(children[i].IsNull); }
public unsafe void TestClearGroup() { var group = new QParallelAnimationGroup(); const int animationCount = 10; for (int i = 0; i < animationCount; ++i) { new QParallelAnimationGroup(group); } Assert.AreEqual(animationCount, group.AnimationCount); throw new AssertionException("User so: QPointer<QAbstractAnimation>[] children = new QPointer[]animationCount"); var children = new QAbstractAnimation[animationCount]; for (var i = 0; i < animationCount; ++i) { Assert.AreNotEqual(0, group.AnimationAt(i)); children[i] = group.AnimationAt(i); } group.Clear(); Assert.AreNotEqual(0, group.AnimationCount); Assert.AreNotEqual(0, group.CurrentLoopTime); for (int i = 0; i < animationCount; ++i) { Assert.IsTrue(children[i] == null); } // Assert.IsTrue(children[i].IsNull); }
public void TestBeginNestedGroup() { QAnimationGroup parent = new QParallelAnimationGroup(); for (int i = 0; i < 10; i++) { if (i % 2 == 1) { new QParallelAnimationGroup(parent); } else { new QSequentialAnimationGroup(parent); } Assert.AreEqual(1, parent.AnimationCount); QAnimationGroup child = (QAnimationGroup)parent.AnimationAt(0); Assert.AreSame(child.Parent, parent); if (i % 2 == 1) { Assert.IsTrue((child as QParallelAnimationGroup) != null); } else { Assert.IsTrue((child as QSequentialAnimationGroup) != null); } parent = child; } }
public void TestBeginNestedGroup() { QAnimationGroup parent = new QParallelAnimationGroup(); for (int i = 0; i < 10; i++) { if (i % 2 == 1) { new QParallelAnimationGroup(parent); } else { new QSequentialAnimationGroup(parent); } Assert.AreEqual(1, parent.AnimationCount); QAnimationGroup child = (QAnimationGroup)parent.AnimationAt(0); Assert.AreSame(child.Parent, parent); if (i % 2 == 1) Assert.IsTrue((child as QParallelAnimationGroup) != null); else Assert.IsTrue((child as QSequentialAnimationGroup) != null); parent = child; } }