Пример #1
0
        public void CIKernel_TestFromPrograms()
        {
            TestRuntime.AssertSystemVersion(PlatformName.iOS, 8, 0, throwIfOtherPlatform: false);
            TestRuntime.AssertSystemVersion(PlatformName.MacOSX, 10, 11, throwIfOtherPlatform: false);

            CIKernel[] kernels =
#if XAMCORE_2_0
                CIKernel.FromProgramMultiple(
#else
                CIKernel.FromPrograms(
#endif
                    NoOpColorKernel + "\n" + NoOpWithParamColorKernel + "\n" + PositionColorKernel + "\n" + NoOpWarpKernel);
            Assert.AreEqual(4, kernels.Length, "CIKernel_TestFromPrograms did not get back the right number of programs");
                            foreach (CIKernel kernel in kernels)
            {
                Assert.IsTrue(kernel is CIColorKernel || kernel is CIWarpKernel, "CIKernel_TestFromPrograms is neither type of kernel?");
            }
        }
Пример #2
0
        public void CIKernel_TestFromPrograms()
        {
            if (!TestRuntime.CheckSystemAndSDKVersion(8, 0))
            {
                Assert.Inconclusive("Custom filters require iOS8+");
            }

            CIKernel[] kernels =
#if XAMCORE_2_0
                CIKernel.FromProgramMultiple(
#else
                CIKernel.FromPrograms(
#endif
                    NoOpColorKernel + "\n" + NoOpWithParamColorKernel + "\n" + PositionColorKernel + "\n" + NoOpWarpKernel);
            Assert.AreEqual(4, kernels.Length, "CIKernel_TestFromPrograms did not get back the right number of programs");
                            foreach (CIKernel kernel in kernels)
            {
                Assert.IsTrue(kernel is CIColorKernel || kernel is CIWarpKernel, "CIKernel_TestFromPrograms is neither type of kernel?");
            }
        }