Skip to content

Commit 64201c4

Browse files
committed
Fix unit tests
1 parent 2b40a5b commit 64201c4

2 files changed

Lines changed: 11 additions & 9 deletions

File tree

Source/Transform/Strategies/FFTTransformer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ final class FFTTransformer: Transformer {
4545

4646
// MARK: - Helpers
4747

48-
private func sqrtq(_ x: [Float]) -> [Float] {
48+
func sqrtq(_ x: [Float]) -> [Float] {
4949
var results = [Float](repeating: 0.0, count: x.count)
5050
vvsqrtf(&results, x, [Int32(x.count)])
5151

Tests/Spec/Estimation/EstimationFactorySpec.swift

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,39 @@ import Nimble
55
final class EstimationFactorySpec: QuickSpec {
66
override func spec() {
77
describe("EstimationFactory") {
8+
let factory = EstimationFactory()
9+
810
describe(".create") {
911
it("creates QuadradicEstimator") {
10-
expect(EstimationFactory.create(.quadradic) is QuadradicEstimator).to(beTrue())
12+
expect(factory.create(.quadradic) is QuadradicEstimator).to(beTrue())
1113
}
1214

1315
it("creates Barycentric") {
14-
expect(EstimationFactory.create(.barycentric) is BarycentricEstimator).to(beTrue())
16+
expect(factory.create(.barycentric) is BarycentricEstimator).to(beTrue())
1517
}
1618

1719
it("creates QuinnsFirst") {
18-
expect(EstimationFactory.create(.quinnsFirst) is QuinnsFirstEstimator).to(beTrue())
20+
expect(factory.create(.quinnsFirst) is QuinnsFirstEstimator).to(beTrue())
1921
}
2022

2123
it("creates QuinnsSecond") {
22-
expect(EstimationFactory.create(.quinnsSecond) is QuinnsSecondEstimator).to(beTrue())
24+
expect(factory.create(.quinnsSecond) is QuinnsSecondEstimator).to(beTrue())
2325
}
2426

2527
it("creates Jains") {
26-
expect(EstimationFactory.create(.jains) is JainsEstimator).to(beTrue())
28+
expect(factory.create(.jains) is JainsEstimator).to(beTrue())
2729
}
2830

2931
it("creates HPS") {
30-
expect(EstimationFactory.create(.hps) is HPSEstimator).to(beTrue())
32+
expect(factory.create(.hps) is HPSEstimator).to(beTrue())
3133
}
3234

3335
it("creates YIN") {
34-
expect(EstimationFactory.create(.yin) is YINEstimator).to(beTrue())
36+
expect(factory.create(.yin) is YINEstimator).to(beTrue())
3537
}
3638

3739
it("creates MaxValue") {
38-
expect(EstimationFactory.create(.maxValue) is MaxValueEstimator).to(beTrue())
40+
expect(factory.create(.maxValue) is MaxValueEstimator).to(beTrue())
3941
}
4042
}
4143
}

0 commit comments

Comments
 (0)