From f69d58e070803e7380fd0fa7b9d03656acbddb7a Mon Sep 17 00:00:00 2001 From: nebmit <76664673+nebmit@users.noreply.github.com> Date: Tue, 12 Mar 2024 15:06:20 +0100 Subject: [PATCH] test: adapt tests to change from mr !2 [skip ci] --- julia/TUG/test/TestBoundary.jl | 4 ---- julia/TUG/test/TestDynamicSimulation.jl | 10 +++++----- julia/TUG/test/TestSimulation.jl | 10 +++++----- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/julia/TUG/test/TestBoundary.jl b/julia/TUG/test/TestBoundary.jl index 2213361..4705088 100644 --- a/julia/TUG/test/TestBoundary.jl +++ b/julia/TUG/test/TestBoundary.jl @@ -8,8 +8,6 @@ @test TUG.getType(be) == TUG.CONSTANT @test TUG.getValue(be) == 1.0 @test TUG.getValue([be]) == [1.0] - - @test_throws ArgumentError TUG.BoundaryElement{Float64}(-1.0) end @testset "Boundary" begin @@ -25,7 +23,6 @@ @test TUG.getBoundaryElementType(boundary, TUG.TOP, 1) == TUG.CLOSED @test TUG.getBoundaryElementType(boundary, TUG.BOTTOM, 1) == TUG.CLOSED - @test_throws ArgumentError TUG.getBoundaryElementType(boundary, TUG.LEFT, -1) @test_throws ArgumentError TUG.getBoundaryElementType(boundary, TUG.RIGHT, 26) @test TUG.getBoundaryElementValue(boundary, TUG.LEFT, 1) == -1.0 @@ -33,7 +30,6 @@ @test TUG.getBoundaryElementValue(boundary, TUG.TOP, 1) == -1.0 @test TUG.getBoundaryElementValue(boundary, TUG.BOTTOM, 1) == -1.0 - @test_throws ArgumentError TUG.getBoundaryElementValue(boundary, TUG.BOTTOM, -1) @test_throws ArgumentError TUG.getBoundaryElementValue(boundary, TUG.TOP, 21) TUG.setBoundarySideClosed!(boundary, TUG.LEFT) diff --git a/julia/TUG/test/TestDynamicSimulation.jl b/julia/TUG/test/TestDynamicSimulation.jl index e48b0ae..c65edcc 100644 --- a/julia/TUG/test/TestDynamicSimulation.jl +++ b/julia/TUG/test/TestDynamicSimulation.jl @@ -113,11 +113,11 @@ TUG.next(simulation) end expected_concentrations = [ - 1.9866377371338924 3.67421468453773 14.255058363518529 3.5916629034159486 1.1419105589005596 - 1.98663773713389 3.674214684537723 14.255058363518497 3.5916629034159406 1.1419105589005576 - 1.9866377371338884 3.6742146845377186 14.255058363518481 3.591662903415937 1.1419105589005565 - 1.9866377371338895 3.674214684537725 14.255058363518502 3.5916629034159424 1.1419105589005574 - 1.9866377371338952 3.6742146845377377 14.255058363518547 3.591662903415955 1.141910558900562 + 2.116922560959072 3.6843335107065727 14.255652775906785 3.5916901126508205 1.141911092414447 + 2.1169225609590687 3.684333510706568 14.255652775906759 3.5916901126508134 1.1419110924144453 + 2.1169225609590674 3.6843335107065607 14.255652775906748 3.591690112650811 1.1419110924144442 + 2.1169225609590687 3.684333510706565 14.255652775906766 3.5916901126508147 1.1419110924144449 + 2.116922560959073 3.684333510706576 14.25565277590681 3.5916901126508267 1.141911092414448 ] @test isapprox( TUG.getConcentrations(simulation, 1), diff --git a/julia/TUG/test/TestSimulation.jl b/julia/TUG/test/TestSimulation.jl index e864655..ea796db 100644 --- a/julia/TUG/test/TestSimulation.jl +++ b/julia/TUG/test/TestSimulation.jl @@ -114,11 +114,11 @@ ) TUG.run(simulation) expected_concentrations = [ - 1.9866377371338924 3.67421468453773 14.255058363518529 3.5916629034159486 1.1419105589005596 - 1.98663773713389 3.674214684537723 14.255058363518497 3.5916629034159406 1.1419105589005576 - 1.9866377371338884 3.6742146845377186 14.255058363518481 3.591662903415937 1.1419105589005565 - 1.9866377371338895 3.674214684537725 14.255058363518502 3.5916629034159424 1.1419105589005574 - 1.9866377371338952 3.6742146845377377 14.255058363518547 3.591662903415955 1.141910558900562 + 2.116922560959072 3.6843335107065727 14.255652775906785 3.5916901126508205 1.141911092414447 + 2.1169225609590687 3.684333510706568 14.255652775906759 3.5916901126508134 1.1419110924144453 + 2.1169225609590674 3.6843335107065607 14.255652775906748 3.591690112650811 1.1419110924144442 + 2.1169225609590687 3.684333510706565 14.255652775906766 3.5916901126508147 1.1419110924144449 + 2.116922560959073 3.684333510706576 14.25565277590681 3.5916901126508267 1.141911092414448 ] @test isapprox(TUG.getConcentrations(grid), expected_concentrations, atol = 1e-6) end