Skip to content

Commit

Permalink
Bump performance tests (#110).
Browse files Browse the repository at this point in the history
  • Loading branch information
oscbyspro committed Oct 31, 2024
1 parent 3c861fb commit 18b507b
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ let package = Package(
),
.testTarget(
name: "Benchmarks",
dependencies: ["Ultimathnum", "TestKit", "TestKit2"]
dependencies: ["Ultimathnum", "TestKit2"]
),
]
)
2 changes: 1 addition & 1 deletion Tests/Benchmarks/BinaryInteger+Comparison.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import CoreKit
import DoubleIntKit
import InfiniIntKit
import TestKit
import TestKit2

//*============================================================================*
// MARK: * Binary Integer x Comparison
Expand Down
2 changes: 1 addition & 1 deletion Tests/Benchmarks/BinaryInteger+Exponentiation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import CoreKit
import DoubleIntKit
import InfiniIntKit
import TestKit
import TestKit2

//*============================================================================*
// MARK: * Binary Integer x Exponentiation
Expand Down
2 changes: 1 addition & 1 deletion Tests/Benchmarks/BinaryInteger+Factorial.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import CoreKit
import DoubleIntKit
import InfiniIntKit
import TestKit
import TestKit2

//*============================================================================*
// MARK: * Binary Integer x Factorial
Expand Down
2 changes: 1 addition & 1 deletion Tests/Benchmarks/BinaryInteger+Geometry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import CoreKit
import DoubleIntKit
import InfiniIntKit
import TestKit
import TestKit2

//*============================================================================*
// MARK: * Binary Integer x Geometry
Expand Down
2 changes: 1 addition & 1 deletion Tests/Benchmarks/BinaryInteger+Stride.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import CoreKit
import DoubleIntKit
import InfiniIntKit
import TestKit
import TestKit2

//*============================================================================*
// MARK: * Binary Integer x Stride
Expand Down
2 changes: 1 addition & 1 deletion Tests/Benchmarks/DoubleInt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import CoreKit
import DoubleIntKit
import TestKit
import TestKit2

//*============================================================================*
// MARK: * Double Int
Expand Down
2 changes: 1 addition & 1 deletion Tests/Benchmarks/Fibonacci.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import CoreKit
import DoubleIntKit
import FibonacciKit
import InfiniIntKit
import TestKit
import TestKit2

//*============================================================================*
// MARK: * Fibonacci
Expand Down
14 changes: 14 additions & 0 deletions Tests/Benchmarks/Projects/Exports.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//=----------------------------------------------------------------------------=
// This source file is part of the Ultimathnum open source project.
//
// Copyright (c) 2023 Oscar Byström Ericsson
// Licensed under Apache License, Version 2.0
//
// See http://www.apache.org/licenses/LICENSE-2.0 for license information.
//=----------------------------------------------------------------------------=

//*============================================================================*
// MARK: * Exports
//*============================================================================*

@_exported import XCTest
1 change: 0 additions & 1 deletion Tests/Benchmarks/Randomness.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import DoubleIntKit
import InfiniIntKit
import RandomIntKit
import TestKit2
import XCTest

//*============================================================================*
// MARK: * Randomness
Expand Down
10 changes: 5 additions & 5 deletions Tests/Benchmarks/TextInt+Base10.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import CoreKit
import DoubleIntKit
import FibonacciKit
import InfiniIntKit
import TestKit
import TestKit2

//*============================================================================*
// MARK: * Text Int x Radix 10
Expand Down Expand Up @@ -65,7 +65,7 @@ final class TextIntBenchmarksOnRadix10: XCTestCase {
counter += UX(Bit(!Self.formatter.encode(value).isEmpty))
}

Test().same(counter, 1_000_000)
XCTAssertEqual(counter, 1_000_000)
}

func testEncodingFirstOneMillionBinaryIntegerAsUXL() throws {
Expand All @@ -76,7 +76,7 @@ final class TextIntBenchmarksOnRadix10: XCTestCase {
counter += UX(Bit(!Self.formatter.encode(value).isEmpty))
}

Test().same(counter, 1_000_000)
XCTAssertEqual(counter, 1_000_000)
}

func testEncodingFirstOneMillionSignMagnitudeAsUX() throws {
Expand All @@ -86,7 +86,7 @@ final class TextIntBenchmarksOnRadix10: XCTestCase {
counter += UX(Bit(!Self.formatter.encode(sign: .plus, magnitude: value).isEmpty))
}

Test().same(counter, 1_000_000)
XCTAssertEqual(counter, 1_000_000)
}

func testEncodingFirstOneMillionSignMagnitudeAsUXL() throws {
Expand All @@ -97,6 +97,6 @@ final class TextIntBenchmarksOnRadix10: XCTestCase {
counter += UX(Bit(!Self.formatter.encode(sign: .plus, magnitude: value).isEmpty))
}

Test().same(counter, 1_000_000)
XCTAssertEqual(counter, 1_000_000)
}
}
10 changes: 5 additions & 5 deletions Tests/Benchmarks/TextInt+Base16.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import CoreKit
import DoubleIntKit
import FibonacciKit
import InfiniIntKit
import TestKit
import TestKit2

//*============================================================================*
// MARK: * Text Int x Radix 16
Expand Down Expand Up @@ -65,7 +65,7 @@ final class TextIntBenchmarksOnRadix16: XCTestCase {
counter += UX(Bit(!Self.formatter.encode(value).isEmpty))
}

Test().same(counter, 1_000_000)
XCTAssertEqual(counter, 1_000_000)
}

func testEncodingFirstOneMillionBinaryIntegerAsUXL() throws {
Expand All @@ -76,7 +76,7 @@ final class TextIntBenchmarksOnRadix16: XCTestCase {
counter += UX(Bit(!Self.formatter.encode(value).isEmpty))
}

Test().same(counter, 1_000_000)
XCTAssertEqual(counter, 1_000_000)
}

func testEncodingFirstOneMillionSignMagnitudeAsUX() throws {
Expand All @@ -86,7 +86,7 @@ final class TextIntBenchmarksOnRadix16: XCTestCase {
counter += UX(Bit(!Self.formatter.encode(sign: .plus, magnitude: value).isEmpty))
}

Test().same(counter, 1_000_000)
XCTAssertEqual(counter, 1_000_000)
}

func testEncodingFirstOneMillionSignMagnitudeAsUXL() throws {
Expand All @@ -97,6 +97,6 @@ final class TextIntBenchmarksOnRadix16: XCTestCase {
counter += UX(Bit(!Self.formatter.encode(sign: .plus, magnitude: value).isEmpty))
}

Test().same(counter, 1_000_000)
XCTAssertEqual(counter, 1_000_000)
}
}

0 comments on commit 18b507b

Please sign in to comment.