|
| 1 | +//===--- WindowsMain.swift ------------------------------------*- swift -*-===// |
| 2 | +// |
| 3 | +// This source file is part of the Swift Numerics open source project |
| 4 | +// |
| 5 | +// Copyright (c) 2019 Apple Inc. and the Swift Numerics project authors |
| 6 | +// Licensed under Apache License v2.0 with Runtime Library Exception |
| 7 | +// |
| 8 | +// See https://swift.org/LICENSE.txt for license information |
| 9 | +// |
| 10 | +//===----------------------------------------------------------------------===// |
| 11 | + |
| 12 | +#if os(Windows) |
| 13 | +import XCTest |
| 14 | + |
| 15 | +@testable |
| 16 | +import RealTests |
| 17 | + |
| 18 | +@testable |
| 19 | +import ComplexTests |
| 20 | + |
| 21 | +extension ElementaryFunctionChecks { |
| 22 | + static var all = testCase([ |
| 23 | + ("testFloat", ElementaryFunctionChecks.testFloat), |
| 24 | + ("testDouble", ElementaryFunctionChecks.testDouble), |
| 25 | + ]) |
| 26 | +} |
| 27 | + |
| 28 | +extension IntegerExponentTests { |
| 29 | + static var all = testCase([ |
| 30 | + ("testFloat", IntegerExponentTests.testFloat), |
| 31 | + ("testDouble", IntegerExponentTests.testDouble), |
| 32 | + ]) |
| 33 | +} |
| 34 | + |
| 35 | +extension ArithmeticTests { |
| 36 | + static var all = testCase([ |
| 37 | + ("testPolar", ArithmeticTests.testPolar), |
| 38 | + ("testBaudinSmith", ArithmeticTests.testBaudinSmith), |
| 39 | + ("testDivisionByZero", ArithmeticTests.testDivisionByZero), |
| 40 | + ]) |
| 41 | +} |
| 42 | + |
| 43 | +#if canImport(_Differentiation) |
| 44 | + extension DifferentiableTests { |
| 45 | + static var all = testCase([ |
| 46 | + ("testComponentGetter", DifferentiableTests.testComponentGetter), |
| 47 | + ("testConjugate", DifferentiableTests.testConjugate), |
| 48 | + ("testArithmetics", DifferentiableTests.testArithmetics), |
| 49 | + ]) |
| 50 | + } |
| 51 | +#endif |
| 52 | + |
| 53 | +extension PropertyTests { |
| 54 | + static var all = testCase([ |
| 55 | + ("testProperties", PropertyTests.testProperties), |
| 56 | + ("testEquatableHashable", PropertyTests.testEquatableHashable), |
| 57 | + ("testCodable", PropertyTests.testCodable), |
| 58 | + ]) |
| 59 | +} |
| 60 | + |
| 61 | +var testCases = [ |
| 62 | + ElementaryFunctionChecks.all, |
| 63 | + IntegerExponentTests.all, |
| 64 | + ArithmeticTests.all, |
| 65 | + PropertyTests.all, |
| 66 | +] |
| 67 | + |
| 68 | +#if canImport(_Differentiation) |
| 69 | +testCases += [ |
| 70 | + DifferentiableTests.all |
| 71 | +] |
| 72 | +#endif |
| 73 | + |
| 74 | +XCTMain(testCases) |
| 75 | + |
| 76 | +#endif |
0 commit comments