diff test/SbpOperators/stencil_test.jl @ 1057:0728e84af0dc feature/nested_stencils

Add length method for stencils (grafted from 0be29e65521e8a5183c81d90c1163fe7c93dfffe)
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 07 Feb 2022 14:34:03 +0100
parents df498ce0cf52
children 54e36688dab8
line wrap: on
line diff
--- a/test/SbpOperators/stencil_test.jl	Thu Jan 20 15:17:37 2022 +0100
+++ b/test/SbpOperators/stencil_test.jl	Mon Feb 07 14:34:03 2022 +0100
@@ -9,6 +9,10 @@
     @test s isa Stencil{Float64, 5}
 
     @test eltype(s) == Float64
+
+    @test length(s) == 5
+    @test length(Stencil((-1,2), (1,2,3,4))) == 4
+
     @test SbpOperators.scale(s, 2) == Stencil((-2,2), (2.,4.,4.,6.,8.))
 
     @test Stencil(1,2,3,4; center=1) == Stencil((0, 3),(1,2,3,4))