Skip to content

Commit

Permalink
macros syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed May 6, 2024
1 parent 795cdaf commit b4a2884
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,37 +27,37 @@ estimation_error_1 = Kriging.estimationerror(ones(size(xs, 2)), zs, xs, mycov1)
estimation_error_2 = Kriging.estimationerror(ones(size(xs, 2)), zs, xs, mycov2)
estimation_error_3 = Kriging.estimationerror(ones(size(xs, 2)), zs, xs, mycov3)

@Test.testset "Kriging" begin
Test.@testset "Kriging" begin
# Testing Kriging.sphericalvariogram()
@Test.testset "Spherical Variogram" begin
@Test.test isapprox(spherical_1, 0.0, atol=1e-6)
@Test.test isapprox(spherical_2, 2.82007, atol=1e-6)
@Test.test isapprox(spherical_3, 1, atol=1e-6)
Test.@testset "Spherical Variogram" begin
Test.@test isapprox(spherical_1, 0.0, atol=1e-6)
Test.@test isapprox(spherical_2, 2.82007, atol=1e-6)
Test.@test isapprox(spherical_3, 1, atol=1e-6)
end

# Testing Kriging.exponentialvariogram()
@Test.testset "Exponential Variogram" begin
@Test.test isapprox(exponential_1, 0.0, atol=1e-6)
@Test.test isapprox(exponential_2, 3.069842455031493, atol=1e-6)
Test.@testset "Exponential Variogram" begin
Test.@test isapprox(exponential_1, 0.0, atol=1e-6)
Test.@test isapprox(exponential_2, 3.069842455031493, atol=1e-6)
end

# Testing Kriging.gaussianvariogram()
@Test.testset "Gaussian Variogram" begin
@Test.test isapprox(gaussian_1, 0.0, atol=1e-6)
@Test.test isapprox(gaussian_2, 3.13287854235668, atol=1e-6)
Test.@testset "Gaussian Variogram" begin
Test.@test isapprox(gaussian_1, 0.0, atol=1e-6)
Test.@test isapprox(gaussian_2, 3.13287854235668, atol=1e-6)
end

@Test.testset "Krige" begin
@Test.test isapprox(krige_results_1, [19.99993512367364, 19.778132898057812, -18.621832575427835, 1.4811239442322404, 0.6000381594407371, 0.39998541082022715], atol=0.1)
@Test.test isapprox(krige_results_2, [19.999945901520327, 19.172644554834168, -19.219551440274383, 1.2150507275634252, 0.5999999999977101, 0.3999999999961652], atol=0.1)
@Test.test isapprox(krige_results_3, [19.999945901706013, 19.17264693896976, -19.219551074375026, 1.2151032013981584, 0.600000000000781, 0.39999999999867536], atol=0.1)
Test.@testset "Krige" begin
Test.@test isapprox(krige_results_1, [19.99993512367364, 19.778132898057812, -18.621832575427835, 1.4811239442322404, 0.6000381594407371, 0.39998541082022715], atol=0.1)
Test.@test isapprox(krige_results_2, [19.999945901520327, 19.172644554834168, -19.219551440274383, 1.2150507275634252, 0.5999999999977101, 0.3999999999961652], atol=0.1)
Test.@test isapprox(krige_results_3, [19.999945901706013, 19.17264693896976, -19.219551074375026, 1.2151032013981584, 0.600000000000781, 0.39999999999867536], atol=0.1)
end

# Testing Kriging.estimationerror()
@Test.testset "Estimation Error" begin
@Test.test isapprox(estimation_error_1, 32.09281702460199, atol=1e-6)
@Test.test isapprox(estimation_error_2, 33.19278009478499, atol=1e-6)
@Test.test isapprox(estimation_error_3, 33.854178427022, atol=1e-6)
Test.@testset "Estimation Error" begin
Test.@test isapprox(estimation_error_1, 32.09281702460199, atol=1e-6)
Test.@test isapprox(estimation_error_2, 33.19278009478499, atol=1e-6)
Test.@test isapprox(estimation_error_3, 33.854178427022, atol=1e-6)
end
end
:passed

0 comments on commit b4a2884

Please sign in to comment.