mirror of
https://github.com/apple/swift-numerics
synced 2026-11-24 04:38:11 +00:00
Merge pull request #140 from compnerd/complete-tests
Tests: add new tests to the Windows test suite
This commit is contained in:
2 files changed
+39
No files matched your search
@@ -8,6 +8,7 @@ See https://swift.org/LICENSE.txt for license information
|
||||
#]]
|
||||
|
||||
add_library(ComplexTests
|
||||
ApproximateEqualityTests.swift
|
||||
ArithmeticTests.swift
|
||||
DifferentiableTests.swift
|
||||
PropertyTests.swift)
|
||||
@@ -18,4 +19,5 @@ target_compile_options(ComplexTests PRIVATE
|
||||
target_link_libraries(ComplexTests PUBLIC
|
||||
$<$<NOT:$<PLATFORM_ID:Darwin>>:Foundation>
|
||||
ComplexModule
|
||||
Numerics
|
||||
XCTest)
|
||||
@@ -18,19 +18,53 @@ import RealTests
|
||||
@testable
|
||||
import ComplexTests
|
||||
|
||||
extension ComplexTests.ElementaryFunctionTests {
|
||||
static var all = testCase([
|
||||
("testFloat", RealTests.ElementaryFunctionTests.testFloat),
|
||||
("testDouble", RealTests.ElementaryFunctionTests.testDouble),
|
||||
])
|
||||
}
|
||||
|
||||
extension RealTests.ElementaryFunctionTests {
|
||||
static var all = testCase([
|
||||
("testFloat", RealTests.ElementaryFunctionTests.testFloat),
|
||||
("testDouble", RealTests.ElementaryFunctionTests.testDouble),
|
||||
])
|
||||
}
|
||||
|
||||
#if swift(>=5.3)
|
||||
extension ElementaryFunctionChecks {
|
||||
static var all = testCase([
|
||||
("testFloat16", ElementaryFunctionChecks.testFloat16),
|
||||
("testFloat", ElementaryFunctionChecks.testFloat),
|
||||
("testDouble", ElementaryFunctionChecks.testDouble),
|
||||
])
|
||||
}
|
||||
#else
|
||||
extension ElementaryFunctionChecks {
|
||||
static var all = testCase([
|
||||
("testFloat", ElementaryFunctionChecks.testFloat),
|
||||
("testDouble", ElementaryFunctionChecks.testDouble),
|
||||
])
|
||||
}
|
||||
#endif
|
||||
|
||||
#if swift(>=5.3)
|
||||
extension IntegerExponentTests {
|
||||
static var all = testCase([
|
||||
("testFloat16", IntegerExponentTests.testFloat16),
|
||||
("testFloat", IntegerExponentTests.testFloat),
|
||||
("testDouble", IntegerExponentTests.testDouble),
|
||||
])
|
||||
}
|
||||
#else
|
||||
extension IntegerExponentTests {
|
||||
static var all = testCase([
|
||||
("testFloat", IntegerExponentTests.testFloat),
|
||||
("testDouble", IntegerExponentTests.testDouble),
|
||||
])
|
||||
}
|
||||
#endif
|
||||
|
||||
extension ArithmeticTests {
|
||||
static var all = testCase([
|
||||
@@ -49,6 +83,8 @@ extension PropertyTests {
|
||||
}
|
||||
|
||||
var testCases = [
|
||||
ComplexTests.ElementaryFunctionTests.all,
|
||||
RealTests.ElementaryFunctionTests.all,
|
||||
ElementaryFunctionChecks.all,
|
||||
IntegerExponentTests.all,
|
||||
ArithmeticTests.all,
|
||||
@@ -59,6 +95,7 @@ var testCases = [
|
||||
extension DifferentiableTests {
|
||||
static var all = testCase([
|
||||
("testComponentGetter", DifferentiableTests.testComponentGetter),
|
||||
("testInitializer", DifferentiableTests.testInitializer),
|
||||
("testConjugate", DifferentiableTests.testConjugate),
|
||||
("testArithmetics", DifferentiableTests.testArithmetics),
|
||||
])
|
||||
|
||||
Reference in new issue
Block a user