Mercurial > repos > public > sbplib_julia
comparison test/Grids/equidistant_grid_test.jl @ 1575:efe1fc4cb6b0
Improve error message when giving arguments of different length to equidistant_grid()
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 25 Apr 2024 14:42:30 +0200 |
parents | 43aaf710463e |
children | 611ae2308aa1 |
comparison
equal
deleted
inserted
replaced
1556:ec5e7926c37b | 1575:efe1fc4cb6b0 |
---|---|
115 | 115 |
116 @test_throws DomainError equidistant_grid((0.0,0.0),(1.0,1.0), 0, 0) | 116 @test_throws DomainError equidistant_grid((0.0,0.0),(1.0,1.0), 0, 0) |
117 @test_throws DomainError equidistant_grid((1.0,1.0),(1.0,1.0), 1, 1) | 117 @test_throws DomainError equidistant_grid((1.0,1.0),(1.0,1.0), 1, 1) |
118 @test_throws DomainError equidistant_grid((1.0,1.0),(-1.0,-1.0), 1, 1) | 118 @test_throws DomainError equidistant_grid((1.0,1.0),(-1.0,-1.0), 1, 1) |
119 | 119 |
120 @test_throws ArgumentError equidistant_grid((0.0,),(8.0,5.0), 4, 3, 4) | |
121 | |
120 @testset "Base" begin | 122 @testset "Base" begin |
121 @test eltype(equidistant_grid(0.0, 1.0, 4)) == Float64 | 123 @test eltype(equidistant_grid(0.0, 1.0, 4)) == Float64 |
122 @test eltype(equidistant_grid((0,0),(1,3), 4, 3)) <: AbstractVector{Float64} | 124 @test eltype(equidistant_grid((0,0),(1,3), 4, 3)) <: AbstractVector{Float64} |
123 | 125 |
124 @test size(equidistant_grid(0.0, 1.0, 4)) == (4,) | 126 @test size(equidistant_grid(0.0, 1.0, 4)) == (4,) |