From 73806f81776f98d3391d879e19ce4ca4a5b7bfd3 Mon Sep 17 00:00:00 2001 From: Shashi Gowda Date: Wed, 27 Sep 2023 13:27:32 -0400 Subject: [PATCH] update tests for SU 1.4 changes --- Project.toml | 2 +- test/build_function_tests/stencil-extents-inplace.jl | 2 +- test/build_function_tests/stencil-extents-outplace.jl | 2 +- test/latexify_refs/frac2.txt | 2 +- test/runtests.jl | 2 +- test/solver.jl | 2 +- test/target_functions/issue123.c | 2 +- test/target_functions/scalar2.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Project.toml b/Project.toml index 3f5719398..81104ab00 100644 --- a/Project.toml +++ b/Project.toml @@ -69,7 +69,7 @@ SciMLBase = "1.8, 2" Setfield = "0.7, 0.8, 1" SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0, 2" StaticArrays = "1.1" -SymbolicUtils = "1.0.1" +SymbolicUtils = "1.4" TreeViews = "0.3" julia = "1.6" diff --git a/test/build_function_tests/stencil-extents-inplace.jl b/test/build_function_tests/stencil-extents-inplace.jl index e8f52fc21..20069daef 100644 --- a/test/build_function_tests/stencil-extents-inplace.jl +++ b/test/build_function_tests/stencil-extents-inplace.jl @@ -6,7 +6,7 @@ ˍ₋out_2 = (view)(ˍ₋out, 2:4, 2:4) for (j, j′) = zip(2:4, reset_to_one(2:4)) for (i, i′) = zip(2:4, reset_to_one(2:4)) - ˍ₋out_2[i′, j′] = (+)(ˍ₋out_2[i′, j′], (*)(1//2, (+)((+)((+)((getindex)(x, i, (+)(1, j)), (getindex)(x, i, (+)(-1, j))), (getindex)(x, (+)(-1, i), j)), (getindex)(x, (+)(1, i), j)))) + ˍ₋out_2[i′, j′] = (+)(ˍ₋out_2[i′, j′], (*)(1//2, (+)((+)((+)((getindex)(x, (+)(-1, i), j), (getindex)(x, (+)(1, i), j)), (getindex)(x, i, (+)(-1, j))), (getindex)(x, i, (+)(1, j))))) end end end diff --git a/test/build_function_tests/stencil-extents-outplace.jl b/test/build_function_tests/stencil-extents-outplace.jl index e7f988a36..e063cf0b3 100644 --- a/test/build_function_tests/stencil-extents-outplace.jl +++ b/test/build_function_tests/stencil-extents-outplace.jl @@ -5,7 +5,7 @@ ˍ₋out_2 = (view)(ˍ₋out, 2:4, 2:4) for (j, j′) = zip(2:4, reset_to_one(2:4)) for (i, i′) = zip(2:4, reset_to_one(2:4)) - ˍ₋out_2[i′, j′] = (+)(ˍ₋out_2[i′, j′], (*)(1//2, (+)((+)((+)((getindex)(x, i, (+)(1, j)), (getindex)(x, i, (+)(-1, j))), (getindex)(x, (+)(-1, i), j)), (getindex)(x, (+)(1, i), j)))) + ˍ₋out_2[i′, j′] = (+)(ˍ₋out_2[i′, j′], (*)(1//2, (+)((+)((+)((getindex)(x, (+)(-1, i), j), (getindex)(x, (+)(1, i), j)), (getindex)(x, i, (+)(-1, j))), (getindex)(x, i, (+)(1, j))))) end end end diff --git a/test/latexify_refs/frac2.txt b/test/latexify_refs/frac2.txt index d243cc50e..ef7493bf4 100644 --- a/test/latexify_refs/frac2.txt +++ b/test/latexify_refs/frac2.txt @@ -1,3 +1,3 @@ \begin{equation} -\frac{\left( z - z^{2} \right) \left( 3 x - 7 z^{23} y \right)}{x} +\frac{\left( 3 x - 7 z^{23} y \right) \left( z - z^{2} \right)}{x} \end{equation} diff --git a/test/runtests.jl b/test/runtests.jl index 530e23af1..6b4e2d3b8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -20,7 +20,7 @@ limit(a, N) = a == N + 1 ? 1 : a == 0 ? N : a if GROUP == "All" || GROUP == "Core" @safetestset "Macro Test" begin include("macro.jl") end @safetestset "Arrays" begin include("arrays.jl") end - @safetestset "Arrays" begin include("stencils.jl") end + @safetestset "View-setting" begin include("stencils.jl") end @safetestset "Complex" begin include("complex.jl") end @safetestset "Semi-polynomial" begin include("semipoly.jl") end @safetestset "Fuzz Arrays" begin include("fuzz-arrays.jl") end diff --git a/test/solver.jl b/test/solver.jl index ffebdc6f5..a29187739 100644 --- a/test/solver.jl +++ b/test/solver.jl @@ -41,7 +41,7 @@ using LambertW @test correctAns(solve_single_eq(exp(x^2)~7,x),[-sqrt(log(7.0)),sqrt(log(7.0))]) @test correctAns(solve_single_eq(sin(x+3)~1//3,x),[asin(1.0/3.0)-3.0]) #strange - @test correctAns(solve_single_eq(sin(x+2//5)+cos(x+2//5)~1//2,x),[acos(0.5/sqrt(2.0))+3.141592653589793/4.0-(2.0/5.0)]) + @test_broken correctAns(solve_single_eq(sin(x+2//5)+cos(x+2//5)~1//2,x),[acos(0.5/sqrt(2.0))+3.141592653589793/4.0-(2.0/5.0)]) #product @test correctAns(solve_single_eq((x^2-4)*(x+1)~0,x),[-2.0,-1.0,2.0]) end diff --git a/test/target_functions/issue123.c b/test/target_functions/issue123.c index 6c2b3bde2..ab03d1fe9 100644 --- a/test/target_functions/issue123.c +++ b/test/target_functions/issue123.c @@ -1,4 +1,4 @@ #include void diffeqf(double* du, const double* RHS1) { - du[0] = u * (M[0] * qd[0] + M[6] * qd[1]) * qd[0]; + du[0] = (M[0] * qd[0] + M[6] * qd[1]) * qd[0] * u; } diff --git a/test/target_functions/scalar2.c b/test/target_functions/scalar2.c index 073e5523d..89e01b2f3 100644 --- a/test/target_functions/scalar2.c +++ b/test/target_functions/scalar2.c @@ -1,4 +1,4 @@ #include void diffeqf(double* du, const double* RHS1, const double* RHS2, const double RHS3) { - du[0] = 1.0 + 2 * RHS3 * 1 + pow(RHS1[0], 2) + 1 / RHS1[1] + pow(sin(RHS2[0]), 3.5); + du[0] = 1.0 + 2 * RHS3 * 1 + 1 / RHS1[1] + pow(RHS1[0], 2) + pow(sin(RHS2[0]), 3.5); }