diff test/Grids/manifolds_test.jl @ 1780:8ecdc5bb46be feature/grids/manifolds

Allow mixed types in constructors for HyperBox and Simplex
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 16 Sep 2024 08:58:12 +0200
parents 2a8a2b52a112
children a73838c9ef94
line wrap: on
line diff
--- a/test/Grids/manifolds_test.jl	Mon Sep 16 08:33:43 2024 +0200
+++ b/test/Grids/manifolds_test.jl	Mon Sep 16 08:58:12 2024 +0200
@@ -30,6 +30,8 @@
     @test HyperBox{<:Any, 2} <: ParameterSpace{2}
     @test HyperBox([1,1], [2,2]) isa HyperBox{Int, 2}
 
+    @test HyperBox([1,2], [1.,2.]) isa HyperBox{Float64,2}
+
     @test limits(HyperBox([1,2], [3,4])) == ([1,2], [3,4])
     @test limits(HyperBox([1,2], [3,4]), 1) == (1,3)
     @test limits(HyperBox([1,2], [3,4]), 2) == (2,4)
@@ -49,6 +51,8 @@
     @test Simplex([1,2], [3,4]) isa Simplex{Int, 2}
     @test Simplex([1,2,3], [4,5,6],[1,1,1]) isa Simplex{Int, 3}
 
+    @test Simplex([1,2], [3.,4.]) isa Simplex{Float64, 2}
+
     @test verticies(Simplex([1,2], [3,4])) == ([1,2], [3,4])
 
     @test unittriangle() isa Simplex{Float64,2}