diff --git a/Package.swift b/Package.swift index f18b4ee..981b6d4 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.2 +// swift-tools-version:5.4 /** * Splash @@ -19,19 +19,19 @@ let package = Package( ], targets: [ .target(name: "Splash"), - .target( + .executableTarget( name: "SplashMarkdown", dependencies: ["Splash"] ), - .target( + .executableTarget( name: "SplashHTMLGen", dependencies: ["Splash"] ), - .target( + .executableTarget( name: "SplashImageGen", dependencies: ["Splash"] ), - .target( + .executableTarget( name: "SplashTokenizer", dependencies: ["Splash"] ), diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift deleted file mode 100644 index b78cd03..0000000 --- a/Tests/LinuxMain.swift +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Splash - * Copyright (c) John Sundell 2018 - * MIT license - see LICENSE.md - */ - -import XCTest -import SplashTests - -var tests = [XCTestCaseEntry]() -tests += SplashTests.makeLinuxTests() -XCTMain(tests) diff --git a/Tests/SplashTests/Core/SplashTestCase.swift b/Tests/SplashTests/Core/SplashTestCase.swift deleted file mode 100644 index b1725ca..0000000 --- a/Tests/SplashTests/Core/SplashTestCase.swift +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Splash - * Copyright (c) John Sundell 2019 - * MIT license - see LICENSE.md - */ - -import Foundation -import XCTest - -/// Abstract base class for all Splash tests -class SplashTestCase: XCTestCase { - #if os(macOS) - func testHasLinuxVerificationTest() { - let concreteType = type(of: self) - - guard concreteType != SyntaxHighlighterTestCase.self else { - return - } - - guard concreteType != SplashTestCase.self else { - return - } - - XCTAssertTrue(concreteType.testNames.contains("testAllTestsRunOnLinux"), - "\(concreteType) doesn't have a test that verifies that its tests run on Linux") - } - #endif -} diff --git a/Tests/SplashTests/Core/SyntaxHighlighterTestCase.swift b/Tests/SplashTests/Core/SyntaxHighlighterTestCase.swift index e1c3ad2..fd27623 100644 --- a/Tests/SplashTests/Core/SyntaxHighlighterTestCase.swift +++ b/Tests/SplashTests/Core/SyntaxHighlighterTestCase.swift @@ -10,7 +10,7 @@ import Splash /// Test case used as an abstract base class for all tests relating to /// syntax highlighting. For all such tests, the Swift grammar is used. -class SyntaxHighlighterTestCase: SplashTestCase { +class SyntaxHighlighterTestCase: XCTestCase { private(set) var highlighter: SyntaxHighlighter! private(set) var builder: OutputBuilderMock! diff --git a/Tests/SplashTests/Core/TestCaseVerifier.swift b/Tests/SplashTests/Core/TestCaseVerifier.swift deleted file mode 100644 index 32ff345..0000000 --- a/Tests/SplashTests/Core/TestCaseVerifier.swift +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Splash - * Copyright (c) John Sundell 2018 - * MIT license - see LICENSE.md - */ - -import Foundation -import XCTest - -struct TestCaseVerifier { - static func verifyLinuxTests(_ tests: [(String, TestClosure)]) -> Bool { - #if os(macOS) - let testNames = Set(tests.map { $0.0 }) - - for name in Case.testNames { - guard name != "testAllTestsRunOnLinux" else { - continue - } - - guard name != "testHasLinuxVerificationTest" else { - continue - } - - guard testNames.contains(name) else { - XCTFail(""" - Test case \(Case.self) does not include test \(name) on Linux. - Please add it to the test case's 'allTests' array. - """) - - return false - } - } - #endif - - return true - } -} diff --git a/Tests/SplashTests/Core/TestClosure.swift b/Tests/SplashTests/Core/TestClosure.swift deleted file mode 100644 index 15d4c1e..0000000 --- a/Tests/SplashTests/Core/TestClosure.swift +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Splash - * Copyright (c) John Sundell 2018 - * MIT license - see LICENSE.md - */ - -import Foundation -import XCTest - -typealias TestClosure = (T) -> () throws -> Void diff --git a/Tests/SplashTests/Core/XCTestCase+TestNames.swift b/Tests/SplashTests/Core/XCTestCase+TestNames.swift deleted file mode 100644 index 8c3fa33..0000000 --- a/Tests/SplashTests/Core/XCTestCase+TestNames.swift +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Splash - * Copyright (c) John Sundell 2018 - * MIT license - see LICENSE.md - */ - -import Foundation -import XCTest - -#if os(macOS) - -extension XCTestCase { - static var testNames: [String] { - return defaultTestSuite.tests.map { test in - let components = test.name.components(separatedBy: .whitespaces) - return components[1].replacingOccurrences(of: "]", with: "") - } - } -} - -#endif diff --git a/Tests/SplashTests/Core/XCTestManifests.swift b/Tests/SplashTests/Core/XCTestManifests.swift deleted file mode 100644 index 30b999c..0000000 --- a/Tests/SplashTests/Core/XCTestManifests.swift +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Splash - * Copyright (c) John Sundell 2018 - * MIT license - see LICENSE.md - */ - -import XCTest - -#if os(Linux) - -public func makeLinuxTests() -> [XCTestCaseEntry] { - return [ - testCase(ClosureTests.allTests), - testCase(CommentTests.allTests), - testCase(DeclarationTests.allTests), - testCase(EnumTests.allTests), - testCase(FunctionCallTests.allTests), - testCase(LiteralTests.allTests), - testCase(OptionalTests.allTests), - testCase(PreprocessorTests.allTests), - testCase(StatementTests.allTests), - testCase(MarkdownTests.allTests) - ] -} - -#endif diff --git a/Tests/SplashTests/Tests/ClosureTests.swift b/Tests/SplashTests/Tests/ClosureTests.swift index 04919c5..eff59a6 100644 --- a/Tests/SplashTests/Tests/ClosureTests.swift +++ b/Tests/SplashTests/Tests/ClosureTests.swift @@ -259,28 +259,4 @@ final class ClosureTests: SyntaxHighlighterTestCase { .plainText("}") ]) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension ClosureTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testTrailingClosureWithArguments", testTrailingClosureWithArguments), - ("testTrailingClosureWithoutParanthesis", testTrailingClosureWithoutParanthesis), - ("testEmptyTrailingClosure", testEmptyTrailingClosure), - ("testClosureArgumentWithSingleArgument", testClosureArgumentWithSingleArgument), - ("testClosureArgumentWithMultipleArguments", testClosureArgumentWithMultipleArguments), - ("testEscapingClosureArgument", testEscapingClosureArgument), - ("testClosureWithInoutArgument", testClosureWithInoutArgument), - ("testPassingClosureAsArgument", testPassingClosureAsArgument), - ("testNestedEscapingClosure", testNestedEscapingClosure), - ("testClosureArgumentShorthands", testClosureArgumentShorthands), - ("testClosureWithWeakSelfCaptureList", testClosureWithWeakSelfCaptureList), - ("testClosureWithUnownedSelfCaptureList", testClosureWithUnownedSelfCaptureList), - ("testClosureWithSingleFunctionCall", testClosureWithSingleFunctionCall) - ] - } } diff --git a/Tests/SplashTests/Tests/CommentTests.swift b/Tests/SplashTests/Tests/CommentTests.swift index 8f7ddec..9a7e61c 100644 --- a/Tests/SplashTests/Tests/CommentTests.swift +++ b/Tests/SplashTests/Tests/CommentTests.swift @@ -358,31 +358,4 @@ final class CommentTests: SyntaxHighlighterTestCase { .plainText("}") ]) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension CommentTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testSingleLineComment", testSingleLineComment), - ("testMultiLineComment", testMultiLineComment), - ("testMultiLineCommentWithDoubleAsterisks", testMultiLineCommentWithDoubleAsterisks), - ("testMutliLineDocumentationComment", testMutliLineDocumentationComment), - ("testCommentStartingWithPunctuation", testCommentStartingWithPunctuation), - ("testCommentEndingWithComma", testCommentEndingWithComma), - ("testCommentPrecededByComma", testCommentPrecededByComma), - ("testCommentWithNumber", testCommentWithNumber), - ("testCommentWithNoWhiteSpaceToPunctuation", testCommentWithNoWhiteSpaceToPunctuation), - ("testCommentsNextToCurlyBrackets", testCommentsNextToCurlyBrackets), - ("testCommentWithinGenericTypeList", testCommentWithinGenericTypeList), - ("testCommentsNextToGenericTypeList", testCommentsNextToGenericTypeList), - ("testCommentsNextToInitialization", testCommentsNextToInitialization), - ("testCommentsNextToProtocolName", testCommentsNextToProtocolName), - ("testCommentsAfterOptionalTypes", testCommentsAfterOptionalTypes), - ("testCommentsAfterArrayTypes", testCommentsAfterArrayTypes) - ] - } } diff --git a/Tests/SplashTests/Tests/DeclarationTests.swift b/Tests/SplashTests/Tests/DeclarationTests.swift index c549641..522a4dc 100644 --- a/Tests/SplashTests/Tests/DeclarationTests.swift +++ b/Tests/SplashTests/Tests/DeclarationTests.swift @@ -1326,67 +1326,4 @@ final class DeclarationTests: SyntaxHighlighterTestCase { .plainText("}") ]) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension DeclarationTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testFunctionDeclaration", testFunctionDeclaration), - ("testRequiredFunctionDeclaration", testRequiredFunctionDeclaration), - ("testPublicFunctionDeclarationWithDocumentationEndingWithDot", testPublicFunctionDeclarationWithDocumentationEndingWithDot), - ("testFunctionDeclarationWithEmptyExternalLabel", testFunctionDeclarationWithEmptyExternalLabel), - ("testFunctionDeclarationWithKeywordArgumentLabel", testFunctionDeclarationWithKeywordArgumentLabel), - ("testFunctionDeclarationWithKeywordArgumentLabelOnNewLine", testFunctionDeclarationWithKeywordArgumentLabelOnNewLine), - ("testGenericFunctionDeclarationWithKeywordArgumentLabel", testGenericFunctionDeclarationWithKeywordArgumentLabel), - ("testGenericFunctionDeclarationWithoutConstraints", testGenericFunctionDeclarationWithoutConstraints), - ("testGenericFunctionDeclarationWithSingleConstraint", testGenericFunctionDeclarationWithSingleConstraint), - ("testGenericFunctionDeclarationWithMultipleConstraints", testGenericFunctionDeclarationWithMultipleConstraints), - ("testGenericFunctionDeclarationWithGenericParameter", testGenericFunctionDeclarationWithGenericParameter), - ("testFunctionDeclarationWithGenericReturnType", testFunctionDeclarationWithGenericReturnType), - ("testGenericStructDeclaration", testGenericStructDeclaration), - ("testClassDeclaration", testClassDeclaration), - ("testCompactClassDeclarationWithInitializer", testCompactClassDeclarationWithInitializer), - ("testClassDeclarationWithDeinit", testClassDeclarationWithDeinit), - ("testClassDeclarationWithMultipleProtocolConformances", testClassDeclarationWithMultipleProtocolConformances), - ("testSubclassDeclaration", testSubclassDeclaration), - ("testGenericSubclassDeclaration", testGenericSubclassDeclaration), - ("testProtocolDeclaration", testProtocolDeclaration), - ("testProtocolDeclarationWithAssociatedTypes", testProtocolDeclarationWithAssociatedTypes), - ("testExtensionDeclaration", testExtensionDeclaration), - ("testExtensionDeclarationWithConvenienceInitializer", testExtensionDeclarationWithConvenienceInitializer), - ("testExtensionDeclarationWithConstraint", testExtensionDeclarationWithConstraint), - ("testLazyPropertyDeclaration", testLazyPropertyDeclaration), - ("testDynamicPropertyDeclaration", testDynamicPropertyDeclaration), - ("testGenericPropertyDeclaration", testGenericPropertyDeclaration), - ("testPropertyDeclarationWithWillSet", testPropertyDeclarationWithWillSet), - ("testPropertyDeclarationWithDidSet", testPropertyDeclarationWithDidSet), - ("testPropertyWithCommentedDidSet", testPropertyWithCommentedDidSet), - ("testPropertyWithSetterAccessLevel", testPropertyWithSetterAccessLevel), - ("testPropertyDeclarationAfterCommentEndingWithVarKeyword", testPropertyDeclarationAfterCommentEndingWithVarKeyword), - ("testPropertyDeclarationWithStaticPropertyDefaultValue", testPropertyDeclarationWithStaticPropertyDefaultValue), - ("testSubscriptDeclaration", testSubscriptDeclaration), - ("testGenericSubscriptDeclaration", testGenericSubscriptDeclaration), - ("testDeferDeclaration", testDeferDeclaration), - ("testFunctionDeclarationWithInOutParameter", testFunctionDeclarationWithInOutParameter), - ("testFunctionDeclarationWithIgnoredParameter", testFunctionDeclarationWithIgnoredParameter), - ("testFunctionDeclarationWithNonEscapedKeywordAsName", testFunctionDeclarationWithNonEscapedKeywordAsName), - ("testFunctionDeclarationWithEscapedKeywordAsName", testFunctionDeclarationWithEscapedKeywordAsName), - ("testFunctionDeclarationWithPreProcessors", testFunctionDeclarationWithPreProcessors), - ("testNonMutatingFunction", testNonMutatingFunction), - ("testRethrowingFunctionDeclaration", testRethrowingFunctionDeclaration), - ("testFunctionDeclarationWithOpaqueReturnType", testFunctionDeclarationWithOpaqueReturnType), - ("testPrefixFunctionDeclaration", testPrefixFunctionDeclaration), - ("testEnumDeclarationWithSomeCase", testEnumDeclarationWithSomeCase), - ("testIndirectEnumDeclaration", testIndirectEnumDeclaration), - ("testPropertyWrapperDeclaration", testPropertyWrapperDeclaration), - ("testWrappedPropertyDeclarations", testWrappedPropertyDeclarations), - ("testWrappedPropertyDeclarationUsingNestedType", testWrappedPropertyDeclarationUsingNestedType), - ("testWrappedPropertyDeclarationUsingExplicitType", testWrappedPropertyDeclarationUsingExplicitType), - ("testGenericInitializerDeclaration", testGenericInitializerDeclaration) - ] - } } diff --git a/Tests/SplashTests/Tests/EnumTests.swift b/Tests/SplashTests/Tests/EnumTests.swift index f2c5064..b747122 100644 --- a/Tests/SplashTests/Tests/EnumTests.swift +++ b/Tests/SplashTests/Tests/EnumTests.swift @@ -57,19 +57,4 @@ final class EnumTests: SyntaxHighlighterTestCase { .plainText("]") ]) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension EnumTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testEnumDotSyntaxInAssignment", testEnumDotSyntaxInAssignment), - ("testEnumDotSyntaxAsArgument", testEnumDotSyntaxAsArgument), - ("testEnumDotSyntaxWithAssociatedValueTreatedAsCall", testEnumDotSyntaxWithAssociatedValueTreatedAsCall), - ("testUsingEnumInSubscript", testUsingEnumInSubscript) - ] - } } diff --git a/Tests/SplashTests/Tests/FunctionCallTests.swift b/Tests/SplashTests/Tests/FunctionCallTests.swift index 00cf1f2..b589477 100644 --- a/Tests/SplashTests/Tests/FunctionCallTests.swift +++ b/Tests/SplashTests/Tests/FunctionCallTests.swift @@ -249,32 +249,4 @@ final class FunctionCallTests: SyntaxHighlighterTestCase { .plainText("}") ]) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension FunctionCallTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testFunctionCallWithIntegers", testFunctionCallWithIntegers), - ("testFunctionCallWithNil", testFunctionCallWithNil), - ("testImplicitInitializerCall", testImplicitInitializerCall), - ("testExplicitInitializerCall", testExplicitInitializerCall), - ("testExplicitInitializerCallUsingTrailingClosureSyntax", testExplicitInitializerCallUsingTrailingClosureSyntax), - ("testDotSyntaxInitializerCall", testDotSyntaxInitializerCall), - ("testAccessingPropertyAfterFunctionCallWithoutArguments", testAccessingPropertyAfterFunctionCallWithoutArguments), - ("testAccessingPropertyAfterFunctionCallWithArguments", testAccessingPropertyAfterFunctionCallWithArguments), - ("testCallingStaticMethodOnGenericType", testCallingStaticMethodOnGenericType), - ("testPassingTypeToFunction", testPassingTypeToFunction), - ("testPassingBoolToUnnamedArgument", testPassingBoolToUnnamedArgument), - ("testIndentedFunctionCalls", testIndentedFunctionCalls), - ("testXCTAssertCalls", testXCTAssertCalls), - ("testUsingTryKeywordWithinFunctionCall", testUsingTryKeywordWithinFunctionCall), - ("testCallingFunctionsWithProjectedPropertyWrapperValues", testCallingFunctionsWithProjectedPropertyWrapperValues), - ("testCallingFunctionWithInoutProjectedPropertyWrapperValue", testCallingFunctionWithInoutProjectedPropertyWrapperValue), - ("testCallingMethodWithSameNameAsKeywordWithTrailingClosureSyntax", testCallingMethodWithSameNameAsKeywordWithTrailingClosureSyntax) - ] - } } diff --git a/Tests/SplashTests/Tests/HTMLOutputFormatTests.swift b/Tests/SplashTests/Tests/HTMLOutputFormatTests.swift index 7f18b38..a317449 100644 --- a/Tests/SplashTests/Tests/HTMLOutputFormatTests.swift +++ b/Tests/SplashTests/Tests/HTMLOutputFormatTests.swift @@ -2,7 +2,7 @@ import Foundation import XCTest import Splash -final class HTMLOutputFormatTests: SplashTestCase { +final class HTMLOutputFormatTests: XCTestCase { private var highlighter: SyntaxHighlighter! override func setUp() { @@ -39,18 +39,4 @@ final class HTMLOutputFormatTests: SplashTestCase { // Hey I'm a comment! """) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension HTMLOutputFormatTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testBasicGeneration", testBasicGeneration), - ("testStrippingGreaterAndLessThanCharactersFromOutput", testStrippingGreaterAndLessThanCharactersFromOutput), - ("testCommentMerging", testCommentMerging) - ] - } } diff --git a/Tests/SplashTests/Tests/LiteralTests.swift b/Tests/SplashTests/Tests/LiteralTests.swift index 09f6aba..44c1575 100644 --- a/Tests/SplashTests/Tests/LiteralTests.swift +++ b/Tests/SplashTests/Tests/LiteralTests.swift @@ -310,34 +310,4 @@ final class LiteralTests: SyntaxHighlighterTestCase { .plainText(")") ]) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension LiteralTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testStringLiteral", testStringLiteral), - ("testStringLiteralPassedToFunction", testStringLiteralPassedToFunction), - ("testStringLiteralWithEscapedQuote", testStringLiteralWithEscapedQuote), - ("testStringLiteralWithAttribute", testStringLiteralWithAttribute), - ("testStringLiteralInterpolation", testStringLiteralInterpolation), - ("testStringLiteralWithInterpolatedClosureArgumentShorthand", testStringLiteralWithInterpolatedClosureArgumentShorthand), - ("testStringLiteralWithCustomIterpolation", testStringLiteralWithCustomIterpolation), - ("testStringLiteralWithInterpolationSurroundedByBrackets", testStringLiteralWithInterpolationSurroundedByBrackets), - ("testStringLiteralWithInterpolationPrefixedByPunctuation", testStringLiteralWithInterpolationPrefixedByPunctuation), - ("testStringLiteralWithInterpolationContainingString", testStringLiteralWithInterpolationContainingString), - ("testMultiLineStringLiteral", testMultiLineStringLiteral), - ("testSingleLineRawStringLiteral", testSingleLineRawStringLiteral), - ("testMultiLineRawStringLiteral", testMultiLineRawStringLiteral), - ("testRawStringWithInterpolation", testRawStringWithInterpolation), - ("testStringLiteralContainingOnlyNewLine", testStringLiteralContainingOnlyNewLine), - ("testDoubleLiteral", testDoubleLiteral), - ("testIntegerLiteralWithSeparators", testIntegerLiteralWithSeparators), - ("testKeyPathLiteral", testKeyPathLiteral), - ("testKeyPathLiteralsAsArguments", testKeyPathLiteralsAsArguments) - ] - } } diff --git a/Tests/SplashTests/Tests/MarkdownTests.swift b/Tests/SplashTests/Tests/MarkdownTests.swift index 6ac19da..8d1da49 100644 --- a/Tests/SplashTests/Tests/MarkdownTests.swift +++ b/Tests/SplashTests/Tests/MarkdownTests.swift @@ -7,7 +7,7 @@ import XCTest import Splash -final class MarkdownTests: SplashTestCase { +final class MarkdownTests: XCTestCase { private var decorator: MarkdownDecorator! override func setUp() { @@ -106,19 +106,4 @@ final class MarkdownTests: SplashTestCase { XCTAssertEqual(decorator.decorate(markdown), expectedResult) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension MarkdownTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testConvertingCodeBlock", testConvertingCodeBlock), - ("testSkippingHighlightingForCodeBlock", testSkippingHighlightingForCodeBlock), - ("testEscapingSpecialCharactersWithinHighlightedCodeBlock", testEscapingSpecialCharactersWithinHighlightedCodeBlock), - ("testEscapingSpecialCharactersWithinSkippedCodeBlock", testEscapingSpecialCharactersWithinSkippedCodeBlock) - ] - } } diff --git a/Tests/SplashTests/Tests/OptionalTests.swift b/Tests/SplashTests/Tests/OptionalTests.swift index 32a62ed..5eb5f26 100644 --- a/Tests/SplashTests/Tests/OptionalTests.swift +++ b/Tests/SplashTests/Tests/OptionalTests.swift @@ -42,18 +42,4 @@ final class OptionalTests: SyntaxHighlighterTestCase { .plainText("()") ]) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension OptionalTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testAssigningPropertyWithOptionalChaining", testAssigningPropertyWithOptionalChaining), - ("testReadingPropertyWithOptionalChaining", testReadingPropertyWithOptionalChaining), - ("testCallingMethodwithOptionalChaining", testCallingMethodwithOptionalChaining) - ] - } } diff --git a/Tests/SplashTests/Tests/PreprocessorTests.swift b/Tests/SplashTests/Tests/PreprocessorTests.swift index 746f46d..6cbcbf4 100644 --- a/Tests/SplashTests/Tests/PreprocessorTests.swift +++ b/Tests/SplashTests/Tests/PreprocessorTests.swift @@ -101,21 +101,4 @@ final class PreprocessorTests: SyntaxHighlighterTestCase { .plainText(")") ]) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension PreprocessorTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testPreprocessing", testPreprocessing), - ("testSelector", testSelector), - ("testFunctionAttribute", testFunctionAttribute), - ("testAvailabilityCheck", testAvailabilityCheck), - ("testWarningDirective", testWarningDirective), - ("testErrorDirective", testErrorDirective) - ] - } } diff --git a/Tests/SplashTests/Tests/StatementTests.swift b/Tests/SplashTests/Tests/StatementTests.swift index fb49203..d609db8 100644 --- a/Tests/SplashTests/Tests/StatementTests.swift +++ b/Tests/SplashTests/Tests/StatementTests.swift @@ -467,33 +467,4 @@ final class StatementTests: SyntaxHighlighterTestCase { .plainText("queryItems") ]) } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension StatementTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testImportStatement", testImportStatement), - ("testImportStatementWithSubmodule", testImportStatementWithSubmodule), - ("testChainedIfElseStatements", testChainedIfElseStatements), - ("testIfLetStatementWithKeywordSymbolName", testIfLetStatementWithKeywordSymbolName), - ("testGuardStatementUnwrappingWeakSelf", testGuardStatementUnwrappingWeakSelf), - ("testSwitchStatement", testSwitchStatement), - ("testSwitchStatementWithSingleAssociatedValue", testSwitchStatementWithSingleAssociatedValue), - ("testSwitchStatementWithMultipleAssociatedValues", testSwitchStatementWithMultipleAssociatedValues), - ("testSwitchStatementWithFallthrough", testSwitchStatementWithFallthrough), - ("testSwitchStatementWithTypePatternMatching", testSwitchStatementWithTypePatternMatching), - ("testSwitchStatementWithOptional", testSwitchStatementWithOptional), - ("testSwitchStatementWithProperty", testSwitchStatementWithProperty), - ("testForStatementWithStaticProperty", testForStatementWithStaticProperty), - ("testForStatementWithContinue", testForStatementWithContinue), - ("testRepeatWhileStatement", testRepeatWhileStatement), - ("testInitializingTypeWithLeadingUnderscore", testInitializingTypeWithLeadingUnderscore), - ("testCallingFunctionWithLeadingUnderscore", testCallingFunctionWithLeadingUnderscore), - ("testTernaryOperationContainingNil", testTernaryOperationContainingNil) - ] - } } diff --git a/Tests/SplashTests/Tests/TokenTypeTests.swift b/Tests/SplashTests/Tests/TokenTypeTests.swift index f4852e0..7ad2066 100644 --- a/Tests/SplashTests/Tests/TokenTypeTests.swift +++ b/Tests/SplashTests/Tests/TokenTypeTests.swift @@ -8,7 +8,7 @@ import Foundation import XCTest import Splash -final class TokenTypeTests: SplashTestCase { +final class TokenTypeTests: XCTestCase { func testConvertingToString() { let standardType = TokenType.comment XCTAssertEqual(standardType.string, "comment") @@ -16,16 +16,4 @@ final class TokenTypeTests: SplashTestCase { let customType = TokenType.custom("MyCustomType") XCTAssertEqual(customType.string, "MyCustomType") } - - func testAllTestsRunOnLinux() { - XCTAssertTrue(TestCaseVerifier.verifyLinuxTests((type(of: self)).allTests)) - } -} - -extension TokenTypeTests { - static var allTests: [(String, TestClosure)] { - return [ - ("testConvertingToString", testConvertingToString) - ] - } }