Skip to content

Commit

Permalink
Added atol values to isapprox tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jannittayao committed Nov 12, 2024
1 parent 4c70ca2 commit dbd1102
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/testPerplex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ if Sys.isunix()
print("melt.SiO2: ")
println(melt.SIO2)
@test !isempty(melt.SIO2) && !any(x->x<45, melt.SIO2) && !any(x->x>75, melt.SIO2)
@test isapprox(melt.SIO2, [NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 66.23928873932091, 66.20069536595133, 66.1129689269046, 65.96817295304906, 65.77167961077932, 65.5254393152636, 65.23386085968349, 64.87278962035367, 64.45898710820259, 64.04463202231602, 63.2097683951158, 62.229362662382414, 61.2299, 60.24657590136964, 59.299682210095334, 58.39293503576102, 57.528805752880565, 56.697199999999995, 55.900244720195786, 55.151072424463784, 54.444161889086686, 53.77171075434216, 53.13486811907912, 52.53058424082473, 51.97033118219873, 51.615110323022066, 51.531989693602064, 51.49388455183463, 51.45425369117167, 51.4165640084052, 51.38137430931284, 51.34737946104821, 51.31412565706284, 51.282015384604605, 51.252599999999994, 51.2249358574551, 51.196284641114616, 51.169935818955075, 51.1451744274128, 51.11510000000001, 50.45745550320106, 50.40943024565815], nans=true)
@test isapprox(melt.SIO2, [NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 66.23928873932091, 66.20069536595133, 66.1129689269046, 65.96817295304906, 65.77167961077932, 65.5254393152636, 65.23386085968349, 64.87278962035367, 64.45898710820259, 64.04463202231602, 63.2097683951158, 62.229362662382414, 61.2299, 60.24657590136964, 59.299682210095334, 58.39293503576102, 57.528805752880565, 56.697199999999995, 55.900244720195786, 55.151072424463784, 54.444161889086686, 53.77171075434216, 53.13486811907912, 52.53058424082473, 51.97033118219873, 51.615110323022066, 51.531989693602064, 51.49388455183463, 51.45425369117167, 51.4165640084052, 51.38137430931284, 51.34737946104821, 51.31412565706284, 51.282015384604605, 51.252599999999994, 51.2249358574551, 51.196284641114616, 51.169935818955075, 51.1451744274128, 51.11510000000001, 50.45745550320106, 50.40943024565815], nans=true, atol = 0.1)
end

modes = perplex_query_modes(scratchdir; importas=:Dict, manual_grid=true, npoints=100)
Expand All @@ -98,7 +98,7 @@ if Sys.isunix()
if haskey(modes, "Do(HP)")
print("modes[\"Do(HP)\"]: ")
println(modes["Do(HP)"])
@test isapprox(modes["Do(HP)"], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.381821359304602, 1.375915226299608, 1.3738211840050927, 1.374457738329655, 1.3705253254297285, 1.366661347624855, 1.3645275034904318, 1.3701797192769967, 1.375450810802064, 1.3797663596440084, 1.38170983102423, 1.3835908068064018, 1.3914280845348614, 1.4096547846120548, 1.4188273299579084, 1.417632212772262, 1.416519868920687, 1.415345984868765, 1.415345984868765, 1.4144863360848499, 1.4126771598516183, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], nans=true)
@test isapprox(modes["Do(HP)"], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.381821359304602, 1.375915226299608, 1.3738211840050927, 1.374457738329655, 1.3705253254297285, 1.366661347624855, 1.3645275034904318, 1.3701797192769967, 1.375450810802064, 1.3797663596440084, 1.38170983102423, 1.3835908068064018, 1.3914280845348614, 1.4096547846120548, 1.4188273299579084, 1.417632212772262, 1.416519868920687, 1.415345984868765, 1.415345984868765, 1.4144863360848499, 1.4126771598516183, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], nans=true, atol = 0.1)
# @test isapprox(modes["Omph(HP)"],[NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, NaN, 1.5736, 7.33183, 13.3273, 13.874, 13.8044, 13.7504, 13.6605, 13.6055, 13.2465, 12.8556, 12.8012, 12.909, 12.8774, 12.8621, 12.8379, 12.8239, 12.8205, 12.839, 12.8654, 12.8914, 12.9423, 13.0084, 13.1195, 13.2487, 13.391, 13.5401, 13.7082, 13.9396, 14.1879, 14.4729, 14.754, 15.0912, 15.5081, 15.9689, 16.4671, 17.0194, 17.5064, 17.1991, 16.9685, 16.6926, 16.4602, 16.1634, 15.921, 15.659, 15.4497, 15.2485, 15.0301, 14.8809, 14.6926, 15.0711, 9.19562, NaN, NaN], nans=true)
end

Expand Down

0 comments on commit dbd1102

Please sign in to comment.