diff --git a/Tests/AlgorithmsPerformanceTests/CombinatoricsPerformanceTests.swift b/Tests/AlgorithmsPerformanceTests/CombinatoricsPerformanceTests.swift new file mode 100644 index 0000000..5e5e9a0 --- /dev/null +++ b/Tests/AlgorithmsPerformanceTests/CombinatoricsPerformanceTests.swift @@ -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.. [XCTestCaseEntry] { return [ - testCase(StableSortPerformanceTests.__allTests), + testCase(CombinatoricsPerformanceTests.__allTests), ] } #endif diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 385a26b..730cdd9 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -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)