diff test/SbpOperators/stencil_test.jl @ 887:0be29e65521e feature/variable_derivatives

Add length method for stencils
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 07 Feb 2022 14:34:03 +0100
parents 011d3ff65e9f
children 54e36688dab8
line wrap: on
line diff
--- a/test/SbpOperators/stencil_test.jl	Mon Feb 07 14:32:29 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))