Skip to content

Commit 61180fd

Browse files
committed
fix tests for deepestregression
1 parent ecd62e9 commit 61180fd

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

test/testdeepestregression.jl

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ import LinRegOutliers: DataSets
1515

1616
result = deepestregression(X, y)
1717

18-
@test isapprox(result[1], 15, atol = eps)
19-
@test isapprox(result[2], 10, atol = eps)
20-
@test isapprox(result[3], 5, atol = eps)
18+
betas = result["betas"]
19+
20+
@test isapprox(betas[1], 15, atol = eps)
21+
@test isapprox(betas[2], 10, atol = eps)
22+
@test isapprox(betas[3], 5, atol = eps)
2123
end
2224

2325
@testset "Stackloss Data Example" begin
@@ -30,10 +32,12 @@ import LinRegOutliers: DataSets
3032

3133
result = deepestregression(setting)
3234

33-
@test isapprox(result[1], -35.37610619, atol = eps)
34-
@test isapprox(result[2], 0.82522124, atol = eps)
35-
@test isapprox(result[3], 0.44247788, atol = eps)
36-
@test isapprox(result[4], -0.07964602, atol = eps)
35+
betas = result["betas"]
36+
37+
@test isapprox(betas[1], -35.37610619, atol = eps)
38+
@test isapprox(betas[2], 0.82522124, atol = eps)
39+
@test isapprox(betas[3], 0.44247788, atol = eps)
40+
@test isapprox(betas[4], -0.07964602, atol = eps)
3741

3842
end
3943
end

0 commit comments

Comments
 (0)