Skip to content

Commit

Permalink
Fix test failing (#96)
Browse files Browse the repository at this point in the history
* Remove the linuxmain file

With swift 5.1, test discovery exists. So the linuxmain should be obsolete.

* Change the available check

The available check seems to be faulty. The compiler condition seems to be working as a workaround. Need to check later again.
  • Loading branch information
mattesmohr authored Sep 10, 2022
1 parent 92b5602 commit 1783d0f
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 346 deletions.
130 changes: 0 additions & 130 deletions Tests/HTMLKitTests/AttributesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
]
}
12 changes: 0 additions & 12 deletions Tests/HTMLKitTests/ComponentTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
]
}
8 changes: 0 additions & 8 deletions Tests/HTMLKitTests/ContextTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,3 @@ final class ContextTests: XCTestCase {
)
}
}

extension ContextTests {

static var allTests = [
("testViewContext", testViewContext),
("testPageContext", testPageContext)
]
}
24 changes: 8 additions & 16 deletions Tests/HTMLKitTests/ConversionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
}
Expand All @@ -39,6 +38,7 @@ final class ConversionTests: XCTestCase {
}

XCTAssertNoThrow(try Converter.default.convert(html: content))
#endif
}
}

Expand All @@ -51,11 +51,3 @@ extension ConversionTests {
self.directory = currentFile.appendingPathComponent("Conversion")
}
}

extension ConversionTests {

static var allTests = [
("testFileConversion", testFileConversion),
("testStringConversion", testStringConversion)
]
}
123 changes: 0 additions & 123 deletions Tests/HTMLKitTests/ElementTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
]
}
7 changes: 0 additions & 7 deletions Tests/HTMLKitTests/LocalizationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,3 @@ extension LocalizationTests {
try renderer.registerLocalization(atPath: currentDirectory.path, defaultLocale: "en")
}
}

extension LocalizationTests {

static var allTests = [
("testLocalization", testLocalization)
]
}
8 changes: 0 additions & 8 deletions Tests/HTMLKitTests/PerformanceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,3 @@ final class PerformanceTests: XCTestCase {
}
}
}

extension PerformanceTests {

static var allTests = [
("testPerformance", testPerformance)
]
}

19 changes: 0 additions & 19 deletions Tests/HTMLKitTests/RenderingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
]
}
10 changes: 0 additions & 10 deletions Tests/HTMLKitTests/TemplatingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,3 @@ final class TemplatingTests: XCTestCase {
)
}
}

extension TemplatingTests {

static var allTests = [
("testEmbeding", testEmbeding),
("testExtending", testExtending),
("testExtendingWithSingles", testExtendingWithSingles)
]
}

Loading

0 comments on commit 1783d0f

Please sign in to comment.