comparison test/Grids/zero_dim_grid_test.jl @ 1854:654a2b7e6824 tooling/benchmarks

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Sat, 11 Jan 2025 10:19:47 +0100
parents 471a948cd2b2
children
comparison
equal deleted inserted replaced
1378:2b5480e2d4bf 1854:654a2b7e6824
1 using Test 1 using Test
2 using Sbplib.Grids 2 using Diffinitive.Grids
3 using StaticArrays 3 using StaticArrays
4 4
5 @testset "ZeroDimGrid" begin 5 @testset "ZeroDimGrid" begin
6 @test ZeroDimGrid(1) isa ZeroDimGrid{Int} 6 @test ZeroDimGrid(1) isa ZeroDimGrid{Int}
7 @test ZeroDimGrid([1,2,3]) isa ZeroDimGrid{Vector{Int}} 7 @test ZeroDimGrid([1,2,3]) isa ZeroDimGrid{Vector{Int}}
39 end 39 end
40 40
41 @testset "boundary_grid" begin 41 @testset "boundary_grid" begin
42 @test_throws ArgumentError("ZeroDimGrid has no boundaries") boundary_grid(ZeroDimGrid(@SVector[1.0,2.0]), :bid) 42 @test_throws ArgumentError("ZeroDimGrid has no boundaries") boundary_grid(ZeroDimGrid(@SVector[1.0,2.0]), :bid)
43 end 43 end
44
45 @testset "boundary_indices" begin
46 @test_throws ArgumentError("ZeroDimGrid has no boundaries") boundary_indices(ZeroDimGrid(@SVector[1.0,2.0]), :bid)
47 end
44 end 48 end