diff test/SbpOperators/readoperator_test.jl @ 828:ca182cbb8f49 operator_storage_array_of_table

Add a method to parse_stencil which allows controlling the element type
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 12 Jan 2022 08:39:48 +0100
parents 219c9661e700
children 21ab60cc0a5c
line wrap: on
line diff
--- a/test/SbpOperators/readoperator_test.jl	Wed Jan 12 07:45:38 2022 +0100
+++ b/test/SbpOperators/readoperator_test.jl	Wed Jan 12 08:39:48 2022 +0100
@@ -111,5 +111,10 @@
             Stencil(-4//43, 59//43, -110//43,   59//43, -4//43,   0//1; center=3),
             Stencil(-1//49,   0//1,   59//49, -118//49, 64//49, -4//49; center=4),
         ]
+
+
+        @test parse_stencil(Float64, TOML.parse(toml)["s1"]) == CenteredStencil(-1/12, 4/3, -5/2, 4/3, -1/12)
+        @test parse_stencil(Float64, TOML.parse(toml)["s2"]) == Stencil(2/1, -5/1, 4/1, -1/1, 0/1, 0/1; center=1)
+        @test parse_stencil(Float64, TOML.parse(toml)["s3"]) == Stencil(1/1, -2/1, 1/1, 0/1, 0/1, 0/1; center=2)
     end
 end