diff test/Grids/equidistant_grid_test.jl @ 1720:7fdc348f91ff feature/lazy_tensors/sparse_conversions

Merge with default
author Vidar Stiernström <vidar.stiernstrom@gmail.com>
date Thu, 05 Sep 2024 08:26:57 -0700
parents b5690ab5f0b8
children 471a948cd2b2
line wrap: on
line diff
--- a/test/Grids/equidistant_grid_test.jl	Wed Sep 04 23:20:28 2024 +0200
+++ b/test/Grids/equidistant_grid_test.jl	Thu Sep 05 08:26:57 2024 -0700
@@ -1,6 +1,5 @@
 using Sbplib.Grids
 using Test
-using Sbplib.RegionIndices
 using Sbplib.LazyTensors
 
 
@@ -63,24 +62,24 @@
 
     @testset "boundary_identifiers" begin
         g = EquidistantGrid(0:0.1:10)
-        @test boundary_identifiers(g) == (Lower(), Upper())
+        @test boundary_identifiers(g) == (LowerBoundary(), UpperBoundary())
         @inferred boundary_identifiers(g)
     end
 
     @testset "boundary_grid" begin
         g = EquidistantGrid(0:0.1:1)
-        @test boundary_grid(g, Lower()) == ZeroDimGrid(0.0)
-        @test boundary_grid(g, Upper()) == ZeroDimGrid(1.0)
+        @test boundary_grid(g, LowerBoundary()) == ZeroDimGrid(0.0)
+        @test boundary_grid(g, UpperBoundary()) == ZeroDimGrid(1.0)
     end
 
     @testset "boundary_indices" begin
         g = EquidistantGrid(0:0.1:1)
-        @test boundary_indices(g, Lower()) == (1,)
-        @test boundary_indices(g, Upper()) == (11,)
+        @test boundary_indices(g, LowerBoundary()) == (1,)
+        @test boundary_indices(g, UpperBoundary()) == (11,)
 
         g = EquidistantGrid(2:0.1:10)
-        @test boundary_indices(g, Lower()) == (1,)
-        @test boundary_indices(g, Upper()) == (81,)
+        @test boundary_indices(g, LowerBoundary()) == (1,)
+        @test boundary_indices(g, UpperBoundary()) == (81,)
 
     end
 
@@ -112,6 +111,7 @@
 @testset "equidistant_grid" begin
     @test equidistant_grid(0.0,1.0, 4) isa EquidistantGrid
     @test equidistant_grid((0.0,0.0),(8.0,5.0), 4, 3) isa TensorGrid
+    @test equidistant_grid((0.0,),(8.0,), 4) isa TensorGrid
 
     # constuctor
     @test_throws DomainError equidistant_grid(0.0, 1.0, 0)