Ejemplo n.º 1
0
        public void GetPreferredTag()
        {
            // This test may fail in the simulator, if the architecture of the simulator isn't the native one (say running x86_64 on an M1 machine),
            // so just skip this test for the simulator.
            TestRuntime.AssertIfSimulatorThenARM64();

            Assert.NotNull(UTType.GetPreferredTag(UTType.PDF, UTType.TagClassFilenameExtension), "GetPreferredTag");
        }
Ejemplo n.º 2
0
        public void GetDeclaration()
        {
            // This test may fail in the simulator, if the architecture of the simulator isn't the native one (say running x86_64 on an M1 machine),
            // so just skip this test for the simulator.
            TestRuntime.AssertIfSimulatorThenARM64();

            Assert.NotNull(UTType.GetDeclaration(UTType.PDF));
        }
Ejemplo n.º 3
0
        public void Save()
        {
            // This test may fail in the simulator, if the architecture of the simulator isn't the native one (say running x86_64 on an M1 machine),
            // so just skip this test for the simulator.
            TestRuntime.AssertIfSimulatorThenARM64();

            using (NSUrl url = NSUrl.FromFilename(GetFileName())) {
                doc = new MyDocument(url);
                doc.Save(url, UIDocumentSaveOperation.ForCreating, OperationHandler);
            }
        }
Ejemplo n.º 4
0
        public void Archive()
        {
            // This test may fail in the simulator, if the architecture of the simulator isn't the native one (say running x86_64 on an M1 machine),
            // so just skip this test for the simulator.
            TestRuntime.AssertIfSimulatorThenARM64();

            var a = UTTypes.Archive;

            Assert.False(a.Dynamic, "Dynamic");
            var z = UTTypes.Zip;

            Assert.True(z.IsSubtypeOf(a), "IsSubtypeOf");
            Assert.True(a.IsSupertypeOf(z), "IsSupertypeOf");
        }
Ejemplo n.º 5
0
        public void CreatePreferredIdentifier()
        {
            // This test may fail in the simulator, if the architecture of the simulator isn't the native one (say running x86_64 on an M1 machine),
            // so just skip this test for the simulator.
            TestRuntime.AssertIfSimulatorThenARM64();

            string[] extensions = new [] { ".html", ".css", ".jpg", ".js", ".otf" };
            // random failure reported in #36708 (on some iPad2 only)
            for (int i = 0; i < 100; i++)
            {
                foreach (var ext in extensions)
                {
                    var result = UTType.CreatePreferredIdentifier(UTType.TagClassMIMEType, ext, null);
                    Assert.NotNull(result, ext + i.ToString());
                }
            }
        }