diff --git a/test/test_p4est_2d.jl b/test/test_p4est_2d.jl index cc46f1c0689..c3c844b9ee7 100644 --- a/test/test_p4est_2d.jl +++ b/test/test_p4est_2d.jl @@ -365,8 +365,8 @@ end # Run without coverage takes 85 time steps. @test startswith(lines[end], "85, 0.3, 1.0, 0.57771") end - @test length(split(lines[end], ",")) == 4 - @test any(occursin.(r"NaN", lines)) == false + @test count(",", lines[end]) == 3 + @test !any(occursin.(r"NaN", lines)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_structured_2d.jl b/test/test_structured_2d.jl index c30583d20d1..1e797e2015c 100644 --- a/test/test_structured_2d.jl +++ b/test/test_structured_2d.jl @@ -749,8 +749,8 @@ end # Run without coverage takes 193 time steps. @test startswith(lines[end], "193, 0.05, 1.0, 0.3160") end - @test length(split(lines[end], ",")) == 4 - @test any(occursin.(r"NaN", lines)) == false + @test count(",", lines[end]) == 3 + @test !any(occursin.(r"NaN", lines)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -797,8 +797,8 @@ end # Run without coverage takes 191 time steps. @test startswith(lines[end], "191, 0.05, 3.70") end - @test length(split(lines[end], ",")) == 10 - @test any(occursin.(r"NaN", lines)) == false + @test count(",", lines[end]) == 9 + @test !any(occursin.(r"NaN", lines)) # Test alphas_min.txt lines = readlines(joinpath("out", "alphas_min.txt")) @@ -811,8 +811,8 @@ end # Run without coverage takes 191 time steps. @test startswith(lines[end], "191, 0.05, -0.0, 0.7216") end - @test length(split(lines[end], ",")) == 10 - @test any(occursin.(r"NaN", lines)) == false + @test count(",", lines[end]) == 9 + @test !any(occursin.(r"NaN", lines)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_tree_2d_euler.jl b/test/test_tree_2d_euler.jl index 54e70804762..2874439b47b 100644 --- a/test/test_tree_2d_euler.jl +++ b/test/test_tree_2d_euler.jl @@ -576,8 +576,8 @@ end # Run without coverage takes 381 time steps. @test startswith(lines[end], "381, 1.0, 1.0, 0.544") end - @test length(split(lines[end], ",")) == 4 - @test any(occursin.(r"NaN", lines)) == false + @test count(",", lines[end]) == 3 + @test !any(occursin.(r"NaN", lines)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let @@ -639,8 +639,8 @@ end # Run without coverage takes 349 time steps. @test startswith(lines[end], "349, 1.0, 0.0002") end - @test length(split(lines[end], ",")) == 14 - @test any(occursin.(r"NaN", lines)) == false + @test count(",", lines[end]) == 13 + @test !any(occursin.(r"NaN", lines)) # Test alphas_min.txt lines = readlines(joinpath("out", "alphas_min.txt")) @@ -653,8 +653,8 @@ end # Run without coverage takes 349 time steps. @test startswith(lines[end], "349, 1.0, -0.0, 0.773") end - @test length(split(lines[end], ",")) == 14 - @test any(occursin.(r"NaN", lines)) == false + @test count(",", lines[end]) == 13 + @test !any(occursin.(r"NaN", lines)) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let