Skip to content

Commit

Permalink
Remove stableSort performance test for now (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbean authored Nov 16, 2018
1 parent 83e5818 commit 6624a39
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// CombinatoricsPerformanceTests.swift
// AlgorithmsPerformanceTests
//
// Created by James Bean on 11/16/18.
//

import XCTest
import Algorithms
import PerformanceTesting

class CombinatoricsPerformanceTests: XCTestCase {

func testCartesianProduct_O_n() {
let benchmark = Benchmark.mutating(
testPoints: Scale.small,
setup: { size -> ([Int],[Int]) in (Array(0..<size),Array(0..<size)) },
measuring: { pair in _ = cartesianProduct(pair.0,pair.1) }
)
XCTAssert(benchmark.performance(is: .linear))
}
}
24 changes: 0 additions & 24 deletions Tests/AlgorithmsPerformanceTests/StableSortPerformanceTests.swift

This file was deleted.

6 changes: 3 additions & 3 deletions Tests/AlgorithmsPerformanceTests/XCTestManifests.swift
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import XCTest

extension StableSortPerformanceTests {
extension CombinatoricsPerformanceTests {
static let __allTests = [
("testStableSort_O_nlogn", testStableSort_O_nlogn),
("testCartesianProduct_O_n", testCartesianProduct_O_n),
]
}

#if !os(macOS)
public func __allTests() -> [XCTestCaseEntry] {
return [
testCase(StableSortPerformanceTests.__allTests),
testCase(CombinatoricsPerformanceTests.__allTests),
]
}
#endif
4 changes: 2 additions & 2 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import DataStructuresTests
import AlgebraPerformanceTests
import AlgebraTests
import DataStructuresPerformanceTests
import AlgorithmsPerformanceTests
import AlgorithmsTests
import DestructureTests
import AlgorithmsPerformanceTests

var tests = [XCTestCaseEntry]()
tests += DataStructuresTests.__allTests()
tests += AlgebraPerformanceTests.__allTests()
tests += AlgebraTests.__allTests()
tests += DataStructuresPerformanceTests.__allTests()
tests += AlgorithmsPerformanceTests.__allTests()
tests += AlgorithmsTests.__allTests()
tests += DestructureTests.__allTests()
tests += AlgorithmsPerformanceTests.__allTests()

XCTMain(tests)

0 comments on commit 6624a39

Please sign in to comment.