diff --git a/Tests/HTMLKitTests/AttributesTests.swift b/Tests/HTMLKitTests/AttributesTests.swift index 335ecb1f..f78fb54e 100644 --- a/Tests/HTMLKitTests/AttributesTests.swift +++ b/Tests/HTMLKitTests/AttributesTests.swift @@ -2732,133 +2732,3 @@ final class AttributesTests: XCTestCase { ) } } - -extension AttributesTests { - - static var allTests = [ - ("testAccesskeyAttribute", testAccesskeyAttribute), - ("testAutocapitalizeAttribute", testAutocapitalizeAttribute), - ("testAutofocusAttribute", testAutofocusAttribute), - ("testClassAttribute", testClassAttribute), - ("testDirectionAttribute", testDirectionAttribute), - ("testDraggableAttribute", testDraggableAttribute), - ("testEditableAttribute", testEditableAttribute), - ("testEnterkeyhintAttribute", testEnterkeyhintAttribute), - ("testHiddenAttribute", testHiddenAttribute), - ("testIdentifierAttribute", testIdentifierAttribute), - ("testLanguageAttribute", testLanguageAttribute), - ("testNonceAttribute", testNonceAttribute), - ("testRoleAttribute", testRoleAttribute), - ("testHasSpellCheckAttribute", testHasSpellCheckAttribute), - ("testStyleAttribute", testStyleAttribute), - ("testTabIndexAttribute", testTabIndexAttribute), - ("testTitleAttribute", testTitleAttribute), - ("testTranslateAttribute", testTranslateAttribute), - ("testAcceptAttribute", testAcceptAttribute), - ("testActionAttribute", testActionAttribute), - ("testAlternateAttribute", testAlternateAttribute), - ("testAsynchronouslyAttribute", testAsynchronouslyAttribute), - ("testCompleteAttribute", testCompleteAttribute), - ("testAutoplayAttribute", testAutoplayAttribute), - ("testCharsetAttribute", testCharsetAttribute), - ("testCheckedAttribute", testCheckedAttribute), - ("testCiteAttribute", testCiteAttribute), - ("testColumnsAttribute", testColumnsAttribute), - ("testColumnSpanAttribute", testColumnSpanAttribute), - ("testContentAttribute", testContentAttribute), - ("testControlsAttribute", testControlsAttribute), - ("testCoordinatesAttribute", testCoordinatesAttribute), - ("testDataAttribute", testDataAttribute), - ("testDateTimeAttribute", testDateTimeAttribute), - ("testDefaultAttribute", testDefaultAttribute), - ("testDeferAttribute", testDeferAttribute), - ("testDisabledAttribute", testDisabledAttribute), - ("testDownloadAttribute", testDownloadAttribute), - ("testEncodingAttribute", testEncodingAttribute), - ("testForAttribute", testForAttribute), - ("testFormAttribute", testFormAttribute), - ("testFormActionAttribute", testFormActionAttribute), - ("testEquivalentAttribute", testEquivalentAttribute), - ("testHeadersAttribute", testHeadersAttribute), - ("testHeightAttribute", testHeightAttribute), - ("testHighAttribute", testHighAttribute), - ("testReferenceAttribute", testReferenceAttribute), - ("testReferenceLanguageAttribute", testReferenceLanguageAttribute), - ("testIsMapAttribute", testIsMapAttribute), - ("testKindAttribute", testKindAttribute), - ("testLabelAttribute", testLabelAttribute), - ("testListAttribute", testListAttribute), - ("testLoopAttribute", testLoopAttribute), - ("testLowAttribute", testLowAttribute), - ("testMaximumAttribute", testMaximumAttribute), - ("testMaximumLengthAttribute", testMaximumLengthAttribute), - ("testMediaAttribute", testMediaAttribute), - ("testMethodAttribute", testMethodAttribute), - ("testMinimumAttribute", testMinimumAttribute), - ("testMinimumLengthAttribute", testMinimumLengthAttribute), - ("testMultipleAttribute", testMultipleAttribute), - ("testMutedAttribute", testMutedAttribute), - ("testNameAttribute", testNameAttribute), - ("testNoValidateAttribute", testNoValidateAttribute), - ("testIsOpenAttribute", testIsOpenAttribute), - ("testOptimumAttribute", testOptimumAttribute), - ("testPatternAttribute", testPatternAttribute), - ("testPartAttribute", testPartAttribute), - ("testPingAttribute", testPingAttribute), - ("testPlaceholderAttribute", testPlaceholderAttribute), - ("testPosterAttribute", testPosterAttribute), - ("testPreloadAttribute", testPreloadAttribute), - ("testReadonlyAttribute", testReadonlyAttribute), - ("testReferrerPolicyAttribute", testReferrerPolicyAttribute), - ("testRelationshipAttribute", testRelationshipAttribute), - ("testRequiredAttribute", testRequiredAttribute), - ("testReversedAttribute", testReversedAttribute), - ("testRowsAttribute", testRowsAttribute), - ("testRowSpanAttribute", testRowSpanAttribute), - ("testSandboxAttribute", testSandboxAttribute), - ("testScopeAttribute", testScopeAttribute), - ("testShapeAttribute", testShapeAttribute), - ("testSizeAttribute", testSizeAttribute), - ("testSizesAttribute", testSizesAttribute), - ("testSlotAttribute", testSlotAttribute), - ("testSpanAttribute", testSpanAttribute), - ("testSourceAttribute", testSourceAttribute), - ("testStartAttribute", testStartAttribute), - ("testStepAttribute", testStepAttribute), - ("testTargetAttribute", testTargetAttribute), - ("testTypeAttribute", testTypeAttribute), - ("testSelectedAttribute", testSelectedAttribute), - ("testCustomAttribute", testCustomAttribute), - ("testWindowEventAttribute", testWindowEventAttribute), - ("testFocusEventAttribute", testFocusEventAttribute), - ("testPointerEventAttribute", testPointerEventAttribute), - ("testMouseEventAttribute", testMouseEventAttribute), - ("testWheelEventAttribute", testWheelEventAttribute), - ("testInputEventAttribute", testInputEventAttribute), - ("testKeyboardEventAttribute", testKeyboardEventAttribute), - ("testDragEventAttribute", testDragEventAttribute), - ("testClipboardEventAttribute", testClipboardEventAttribute), - ("testSelectionEventAttribute", testSelectionEventAttribute), - ("testMediaEventAttribute", testMediaEventAttribute), - ("testFormEventAttribute", testFormEventAttribute), - ("testDetailEventAttribute", testDetailEventAttribute), - ("testRoleDescriptionAriaAttribute", testRoleDescriptionAriaAttribute), - ("testRelevantAriaAttribute", testRelevantAriaAttribute), - ("testOwnsAriaAttribute", testOwnsAriaAttribute), - ("testLiveAriaAttribute", testLiveAriaAttribute), - ("testLabeledByAriaAttribute", testLabeledByAriaAttribute), - ("testLabelAriaAttribute", testLabelAriaAttribute), - ("testKeyShortcutsAriaAttribute", testKeyShortcutsAriaAttribute), - ("testInvalidAriaAttribute", testInvalidAriaAttribute), - ("testHiddenAriaAttribute", testHiddenAriaAttribute), - ("testHasPopupAriaAttribute", testHasPopupAriaAttribute), - ("testFlowToAriaAttribute", testFlowToAriaAttribute), - ("testErrorMessageAriaAttribute", testErrorMessageAriaAttribute), - ("testDisabledAriaAttribute", testDetailsAriaAttribute), - ("testDescribedByAriaAttribute", testDescribedByAriaAttribute), - ("testCurrentAriaAttribute", testCurrentAriaAttribute), - ("testControlsAriaAttribute", testControlsAriaAttribute), - ("testBusyAriaAttribute", testBusyAriaAttribute), - ("testAtomicAriaAttribute", testAtomicAriaAttribute) - ] -} diff --git a/Tests/HTMLKitTests/ComponentTests.swift b/Tests/HTMLKitTests/ComponentTests.swift index d104044a..0f3c9ac9 100644 --- a/Tests/HTMLKitTests/ComponentTests.swift +++ b/Tests/HTMLKitTests/ComponentTests.swift @@ -105,15 +105,3 @@ final class ComponentTests: XCTestCase { ) } } - -extension ComponentTests { - - static var allTests = [ - ("testMetaTitleComponent", testMetaTitleComponent), - ("testMetaDescriptionComponent", testMetaDescriptionComponent), - ("testFaviconComponent", testFaviconComponent), - ("testAuthorComponent", testAuthorComponent), - ("testStylesheetComponent", testStylesheetComponent), - ("testViewportComponent", testViewportComponent) - ] -} diff --git a/Tests/HTMLKitTests/ContextTests.swift b/Tests/HTMLKitTests/ContextTests.swift index f1e8182f..08ec1d5c 100644 --- a/Tests/HTMLKitTests/ContextTests.swift +++ b/Tests/HTMLKitTests/ContextTests.swift @@ -80,11 +80,3 @@ final class ContextTests: XCTestCase { ) } } - -extension ContextTests { - - static var allTests = [ - ("testViewContext", testViewContext), - ("testPageContext", testPageContext) - ] -} diff --git a/Tests/HTMLKitTests/ConversionTests.swift b/Tests/HTMLKitTests/ConversionTests.swift index 1e56d093..98c48b02 100644 --- a/Tests/HTMLKitTests/ConversionTests.swift +++ b/Tests/HTMLKitTests/ConversionTests.swift @@ -13,23 +13,22 @@ final class ConversionTests: XCTestCase { func testFileConversion() throws { +#if os(Linux) + throw XCTSkip("Requires macOS >= 11.0") +#else guard let directory = directory else { return XCTFail("No directory.") } - guard #available(macOS 11.0, *) else { - throw XCTSkip("Requires macOS >= 11.0") - } - XCTAssertNoThrow(try Converter.default.convert(directory: directory, option: .print)) +#endif } func testStringConversion() throws { - guard #available(macOS 11.0, *) else { - throw XCTSkip("Requires macOS >= 11.0") - } - +#if os(Linux) + throw XCTSkip("Requires macOS >= 11.0") +#else guard let directory = directory else { return XCTFail("No directory.") } @@ -39,6 +38,7 @@ final class ConversionTests: XCTestCase { } XCTAssertNoThrow(try Converter.default.convert(html: content)) +#endif } } @@ -51,11 +51,3 @@ extension ConversionTests { self.directory = currentFile.appendingPathComponent("Conversion") } } - -extension ConversionTests { - - static var allTests = [ - ("testFileConversion", testFileConversion), - ("testStringConversion", testStringConversion) - ] -} diff --git a/Tests/HTMLKitTests/ElementTests.swift b/Tests/HTMLKitTests/ElementTests.swift index 2a928c37..1655fdfd 100644 --- a/Tests/HTMLKitTests/ElementTests.swift +++ b/Tests/HTMLKitTests/ElementTests.swift @@ -1885,126 +1885,3 @@ final class ElementTests: XCTestCase { ) } } - -extension ElementTests { - - static var allTests = [ - ("testHeadElement", testHeadElement), - ("testTitleElement", testTitleElement), - ("testBaseElement", testBaseElement), - ("testLinkElement", testLinkElement), - ("testMetaElement", testMetaElement), - ("testStyleElement", testStyleElement), - ("testHtmlElement", testHtmlElement), - ("testBodyElement", testBodyElement), - ("testArticleElement", testArticleElement), - ("testSectionElement", testSectionElement), - ("testNavigationElement", testNavigationElement), - ("testAsideElement", testAsideElement), - ("testHeading1Element", testHeading1Element), - ("testHeading2Element", testHeading2Element), - ("testHeading3Element", testHeading3Element), - ("testHeading4Element", testHeading4Element), - ("testHeading5Element", testHeading5Element), - ("testHeading6Element", testHeading6Element), - ("testHeadingGroupElement", testHeadingGroupElement), - ("testHeaderElement", testHeaderElement), - ("testFooterElement", testFooterElement), - ("testAdressElement", testAdressElement), - ("testParagraphElement", testParagraphElement), - ("testHorizontalRuleElement", testHorizontalRuleElement), - ("testPreformattedTextElement", testPreformattedTextElement), - ("testBlockquoteElement", testBlockquoteElement), - ("testOrderedListElement", testOrderedListElement), - ("testUnorderedListElement", testUnorderedListElement), - ("testListItemElement", testListItemElement), - ("testDescriptionListElement", testDescriptionListElement), - ("testTermNameElement", testTermNameElement), - ("testTermDefinitionElement", testTermDefinitionElement), - ("testFigureElement", testFigureElement), - ("testFigureCaptionElement", testFigureCaptionElement), - ("testMainElement", testMainElement), - ("testDivisionElement", testDivisionElement), - ("testAnchorElement", testAnchorElement), - ("testEmphasizeElement", testEmphasizeElement), - ("testStrongElement", testStrongElement), - ("testSmallElement", testSmallElement), - ("testCiteElement", testCiteElement), - ("testShortQuoteElement", testShortQuoteElement), - ("testDefinitionElement", testDefinitionElement), - ("testAbbreviationElement", testAbbreviationElement), - ("testRubyElement", testRubyElement), - ("testRubyTextElement", testRubyTextElement), - ("testRubyPronunciationElement", testRubyPronunciationElement), - ("testDataElement", testDataElement), - ("testTimeElement", testTimeElement), - ("testCodeElement", testCodeElement), - ("testVariableElement", testVariableElement), - ("testSampleOutputElement", testSampleOutputElement), - ("testKeyboardInputElement", testKeyboardInputElement), - ("testSubscriptElement", testSubscriptElement), - ("testSuperscriptElement", testSuperscriptElement), - ("testItalicElement", testItalicElement), - ("testBoldElement", testBoldElement), - ("testUnderlineElement", testUnderlineElement), - ("testMarkElement", testMarkElement), - ("testBdiElement", testBdiElement), - ("testBdoElement", testBdoElement), - ("testSpanElement", testSpanElement), - ("testLineBreakElement", testLineBreakElement), - ("testWordBreakElement", testWordBreakElement), - ("testInsertedTextElement", testInsertedTextElement), - ("testDeletedTextElement", testDeletedTextElement), - ("testPictureElement", testPictureElement), - ("testSourceElement", testSourceElement), - ("testImageElement", testImageElement), - ("testInlineFrameElement", testInlineFrameElement), - ("testEmbedElement", testEmbedElement), - ("testObjectElement", testObjectElement), - ("testParameterElement", testParameterElement), - ("testVideoElement", testVideoElement), - ("testAudioElement", testAudioElement), - ("testTrackElement", testTrackElement), - ("testMapElement", testMapElement), - ("testAreaElement", testAreaElement), - ("testTableElement", testTableElement), - ("testCaptionElement", testCaptionElement), - ("testColumnGroupElement", testColumnGroupElement), - ("testColumnElement", testColumnElement), - ("testTableBodyElement", testTableBodyElement), - ("testTableHeadElement", testTableHeadElement), - ("testTableFootElement", testTableFootElement), - ("testTableRowElement", testTableRowElement), - ("testDataCellElement", testDataCellElement), - ("testHeaderCellElement", testHeaderCellElement), - ("testFormElement", testFormElement), - ("testLabelElement", testLabelElement), - ("testInputElement", testInputElement), - ("testButtonElement", testButtonElement), - ("testDataListElement", testDataListElement), - ("testOptionGroupElement", testOptionGroupElement), - ("testOptionElement", testOptionElement), - ("testTextAreaElement", testTextAreaElement), - ("testOutputElement", testOutputElement), - ("testProgressElement", testProgressElement), - ("testMeterElement", testMeterElement), - ("testFieldsetElement", testFieldsetElement), - ("testLegendElement", testLegendElement), - ("testDetailsElement", testDetailsElement), - ("testSummaryElement", testSummaryElement), - ("testDialogElement", testDialogElement), - ("testScriptElement", testScriptElement), - ("testNoScriptElement", testNoScriptElement), - ("testTemplateElement", testTemplateElement), - ("testCanvasElement", testCanvasElement), - ("testVectorElement", testVectorElement), - ("testCircleElement", testCircleElement), - ("testRectangleElement", testRectangleElement), - ("testEllipseElement", testEllipseElement), - ("testLineElement", testLineElement), - ("testPolygonElement", testPolygonElement), - ("testPolylineElement", testPolylineElement), - ("testPathElement", testPathElement), - ("testUseElement", testUseElement) - ] -} diff --git a/Tests/HTMLKitTests/LocalizationTests.swift b/Tests/HTMLKitTests/LocalizationTests.swift index dd1b1583..d40bec35 100644 --- a/Tests/HTMLKitTests/LocalizationTests.swift +++ b/Tests/HTMLKitTests/LocalizationTests.swift @@ -43,10 +43,3 @@ extension LocalizationTests { try renderer.registerLocalization(atPath: currentDirectory.path, defaultLocale: "en") } } - -extension LocalizationTests { - - static var allTests = [ - ("testLocalization", testLocalization) - ] -} diff --git a/Tests/HTMLKitTests/PerformanceTests.swift b/Tests/HTMLKitTests/PerformanceTests.swift index 95f063be..01720a27 100644 --- a/Tests/HTMLKitTests/PerformanceTests.swift +++ b/Tests/HTMLKitTests/PerformanceTests.swift @@ -19,11 +19,3 @@ final class PerformanceTests: XCTestCase { } } } - -extension PerformanceTests { - - static var allTests = [ - ("testPerformance", testPerformance) - ] -} - diff --git a/Tests/HTMLKitTests/RenderingTests.swift b/Tests/HTMLKitTests/RenderingTests.swift index 8c8a96d1..1e7974c5 100644 --- a/Tests/HTMLKitTests/RenderingTests.swift +++ b/Tests/HTMLKitTests/RenderingTests.swift @@ -269,22 +269,3 @@ final class RenderingTests: XCTestCase { ) } } - -extension RenderingTests { - - static var allTests = [ - ("testRenderingDocument", testRenderingDocument), - ("testRenderingContentTag", testRenderingContentTag), - ("testRenderingEmptyTag", testRenderingEmptyTag), - ("testRenderingCommentTag", testRenderingCommentTag), - ("testRenderingAttributes", testRenderingAttributes), - ("testRenderingAttributesWithUnterscore", testRenderingAttributesWithUnterscore), - ("testRenderingAttributesWithHyphens", testRenderingAttributesWithHyphens), - ("testNesting", testNesting), - ("testEscaping", testEscaping), - ("testModified", testModified), - ("testUnmodified", testUnmodified), - ("testModifiedAndUnwrapped", testModifiedAndUnwrapped), - ("testRenderingCustomProperty", testRenderingCustomProperty) - ] -} diff --git a/Tests/HTMLKitTests/TemplatingTests.swift b/Tests/HTMLKitTests/TemplatingTests.swift index 73c829bc..7242a581 100644 --- a/Tests/HTMLKitTests/TemplatingTests.swift +++ b/Tests/HTMLKitTests/TemplatingTests.swift @@ -187,13 +187,3 @@ final class TemplatingTests: XCTestCase { ) } } - -extension TemplatingTests { - - static var allTests = [ - ("testEmbeding", testEmbeding), - ("testExtending", testExtending), - ("testExtendingWithSingles", testExtendingWithSingles) - ] -} - diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift deleted file mode 100644 index 2318fee7..00000000 --- a/Tests/LinuxMain.swift +++ /dev/null @@ -1,13 +0,0 @@ -import XCTest -@testable import HTMLKitTests - -XCTMain([ - testCase(ComponentTests.allTests), - testCase(ContextTests.allTests), - testCase(ElementTests.allTests), - testCase(LocalizationTests.allTests), - testCase(PerformanceTests.allTests), - testCase(RenderingTests.allTests), - testCase(TemplatingTests.allTests), - testCase(AttributesTests.allTests) -])