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"); }
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)); }
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); } }
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"); }
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()); } } }