mirror of
https://github.com/apple/swift-numerics
synced 2026-11-25 04:47:53 +00:00
Rename some tests to reflect what they actually do.
This commit is contained in:
1 parent
ddbc41f80b
commit
337be4044e
6 files changed
+36
-15
No files matched your search
@@ -1,7 +1,19 @@
|
||||
//===--- ApproximateEqualityTests.swift -----------------------*- swift -*-===//
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
// Copyright (c) 2020 Apple Inc. and the Swift project authors
|
||||
// Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
//
|
||||
// See https://swift.org/LICENSE.txt for license information
|
||||
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import Numerics
|
||||
import XCTest
|
||||
|
||||
final class ElementaryFunctionTests: XCTestCase {
|
||||
final class ApproximateEqualityTests: XCTestCase {
|
||||
|
||||
func testSpecials<T: Real>(absolute tol: T) {
|
||||
let zero = Complex<T>.zero
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
//===--- ApproximateEqualityTests.swift -----------------------*- swift -*-===//
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
// Copyright (c) 2020 Apple Inc. and the Swift project authors
|
||||
// Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
//
|
||||
// See https://swift.org/LICENSE.txt for license information
|
||||
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
import RealModule
|
||||
import XCTest
|
||||
|
||||
final class ElementaryFunctionTests: XCTestCase {
|
||||
final class ApproximateEqualityTests: XCTestCase {
|
||||
|
||||
func testSpecials<T: Real>(absolute tol: T) {
|
||||
let zero = T.zero
|
||||
|
||||
@@ -9,8 +9,8 @@ See https://swift.org/LICENSE.txt for license information
|
||||
|
||||
add_library(RealTests
|
||||
ApproximateEqualityTests.swift
|
||||
ElementaryFunctionChecks.swift
|
||||
IntegerExponentTests.swift
|
||||
RealTests.swift
|
||||
RealTestSupport.swift)
|
||||
target_compile_options(RealTests PRIVATE
|
||||
-enable-testing)
|
||||
|
||||
File renamed without changes.
@@ -174,10 +174,7 @@ extension Double {
|
||||
|
||||
final class IntegerExponentTests: XCTestCase {
|
||||
|
||||
#if swift(>=5.3)
|
||||
@available(iOS 14.0, watchOS 14.0, tvOS 7.0, *)
|
||||
@available(macOS, unavailable)
|
||||
@available(macCatalyst, unavailable)
|
||||
#if swift(>=5.3) && !os(macOS)
|
||||
func testFloat16() {
|
||||
Float16.testIntegerExponent()
|
||||
}
|
||||
|
||||
@@ -18,17 +18,17 @@ import RealTests
|
||||
@testable
|
||||
import ComplexTests
|
||||
|
||||
extension ComplexTests.ElementaryFunctionTests {
|
||||
extension ComplexTests.ApproximateEqualityTests {
|
||||
static var all = testCase([
|
||||
("testFloat", RealTests.ElementaryFunctionTests.testFloat),
|
||||
("testDouble", RealTests.ElementaryFunctionTests.testDouble),
|
||||
("testFloat", ComplexTests.ApproximateEqualityTests.testFloat),
|
||||
("testDouble", ComplexTests.ApproximateEqualityTests.testDouble),
|
||||
])
|
||||
}
|
||||
|
||||
extension RealTests.ElementaryFunctionTests {
|
||||
extension RealTests.ApproximateEqualityTests {
|
||||
static var all = testCase([
|
||||
("testFloat", RealTests.ElementaryFunctionTests.testFloat),
|
||||
("testDouble", RealTests.ElementaryFunctionTests.testDouble),
|
||||
("testFloat", RealTests.ApproximateEqualityTests.testFloat),
|
||||
("testDouble", RealTests.ApproximateEqualityTests.testDouble),
|
||||
])
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ extension PropertyTests {
|
||||
}
|
||||
|
||||
var testCases = [
|
||||
ComplexTests.ElementaryFunctionTests.all,
|
||||
RealTests.ElementaryFunctionTests.all,
|
||||
ComplexTests.ApproximateEqualityTests.all,
|
||||
RealTests.ApproximateEqualityTests.all,
|
||||
ElementaryFunctionChecks.all,
|
||||
IntegerExponentTests.all,
|
||||
ArithmeticTests.all,
|
||||
|
||||
Reference in new issue
Block a user