public void Ctor_Arrays()
        {
            TestRuntime.AssertXcodeVersion(5, 0, 1);

            NSNumber[] keys   = new NSNumber[] { 1.0f, 2.0f, 3.0f };
            NSNumber[] values = new NSNumber[] { 1.0f, 2.0f, 3.0f };
            using (var s = new SKKeyframeSequence(keys, values)) {
                Assert.That(s.Count, Is.EqualTo((nuint)3), "Count-1");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-1");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-1");
            }

            float[] values_f = new [] { 4.0f, 5.0f, 6.0f };
            using (var s = new SKKeyframeSequence(keys, values_f)) {
                Assert.That(s.Count, Is.EqualTo((nuint)3), "Count-2");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-2");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-2");
            }

            double[] values_d = new [] { 7.0d, 8.0d, 9.0d };
            using (var s = new SKKeyframeSequence(keys, values_d)) {
                Assert.That(s.Count, Is.EqualTo((nuint)3), "Count-3");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-3");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-3");
            }
        }
Ejemplo n.º 2
0
        public void Ctor_Arrays_Null()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(7, 0))
            {
                Assert.Ignore("Requires iOS7");
            }

            using (var s = new SKKeyframeSequence(null, (NSNumber [])null)) {
                Assert.That(s.Count, Is.EqualTo((nuint)0), "Count-1");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-1");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-1");
            }

            using (var s = new SKKeyframeSequence(null, (float [])null)) {
                Assert.That(s.Count, Is.EqualTo((nuint)0), "Count-2");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-2");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-2");
            }

            using (var s = new SKKeyframeSequence(null, (double [])null)) {
                Assert.That(s.Count, Is.EqualTo((nuint)0), "Count-3");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-3");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-3");
            }
        }
        public void Ctor_Capacity()
        {
            TestRuntime.AssertXcodeVersion(5, 0, 1);

            using (var s = new SKKeyframeSequence(0)) {
                Assert.That(s.Count, Is.EqualTo((nuint)0), "Count-0");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-0");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-0");
            }

            using (var s = new SKKeyframeSequence(1)) {
                Assert.That(s.Count, Is.EqualTo((nuint)0), "Count-1");
            }
        }
Ejemplo n.º 4
0
        public void Ctor_Capacity()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(7, 0))
            {
                Assert.Ignore("Requires iOS7");
            }

            using (var s = new SKKeyframeSequence(0)) {
                Assert.That(s.Count, Is.EqualTo((nuint)0), "Count-0");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-0");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-0");
            }

            using (var s = new SKKeyframeSequence(1)) {
                Assert.That(s.Count, Is.EqualTo((nuint)0), "Count-1");
            }
        }
        public void Ctor_Arrays_Null()
        {
            TestRuntime.AssertXcodeVersion(5, 0, 1);

            using (var s = new SKKeyframeSequence(null, (NSNumber [])null)) {
                Assert.That(s.Count, Is.EqualTo((nuint)0), "Count-1");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-1");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-1");
            }

            using (var s = new SKKeyframeSequence(null, (float [])null)) {
                Assert.That(s.Count, Is.EqualTo((nuint)0), "Count-2");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-2");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-2");
            }

            using (var s = new SKKeyframeSequence(null, (double [])null)) {
                Assert.That(s.Count, Is.EqualTo((nuint)0), "Count-3");
                Assert.That(s.InterpolationMode, Is.EqualTo(SKInterpolationMode.Linear), "SKInterpolationMode-3");
                Assert.That(s.RepeatMode, Is.EqualTo(SKRepeatMode.Clamp), "RepeatMode-3");
            }
        }