Mercurial > repos > public > sbplib_julia
annotate test/Grids/manifolds_test.jl @ 1564:35fe4375b35f feature/grids/manifolds
Export things and fix ConcreteChart and Simplex
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 25 Apr 2024 13:17:48 +0200 |
parents | 81e97d3bec8c |
children | 157c43966b06 |
rev | line source |
---|---|
1558 | 1 using Test |
2 | |
3 using Sbplib.Grids | |
4 using Sbplib.RegionIndices | |
5 using Sbplib.LazyTensors | |
6 | |
7 # using StaticArrays | |
8 | |
9 @testset "HyperBox" begin | |
10 @test HyperBox([1,1], [2,2]) isa HyperBox{Int, 2} | |
11 | |
12 @test limits(HyperBox([1,2], [3,4])) == ([1,2], [3,4]) | |
13 @test limits(HyperBox([1,2], [3,4]), 1) == (1,3) | |
14 @test limits(HyperBox([1,2], [3,4]), 2) == (2,4) | |
15 | |
16 @test unitinterval() isa HyperBox{Float64,1} | |
17 @test limits(unitinterval()) == ([0], [1]) | |
18 | |
19 @test unitinterval(Int) isa HyperBox{Int,1} | |
20 @test limits(unitinterval(Int)) == ([0], [1]) | |
21 | |
22 @test unitsquare() isa HyperBox{Float64,2} | |
23 @test limits(unitsquare()) == ([0,0],[1,1]) | |
24 | |
25 @test unitcube() isa HyperBox{Float64,3} | |
26 @test limits(unitcube()) == ([0,0,0],[1,1,1]) | |
27 | |
28 @test unithyperbox(4) isa HyperBox{Float64,4} | |
29 @test limits(unithyperbox(4)) == ([0,0,0,0],[1,1,1,1]) | |
30 end | |
31 | |
32 @testset "Simplex" begin | |
33 @test Simplex([1,2], [3,4]) isa Simplex{Int, 2} | |
1564
35fe4375b35f
Export things and fix ConcreteChart and Simplex
Jonatan Werpers <jonatan@werpers.com>
parents:
1558
diff
changeset
|
34 @test Simplex([1,2,3], [4,5,6],[1,1,1]) isa Simplex{Int, 3} |
1558 | 35 end |
36 | |
37 @testset "Chart" begin | |
1564
35fe4375b35f
Export things and fix ConcreteChart and Simplex
Jonatan Werpers <jonatan@werpers.com>
parents:
1558
diff
changeset
|
38 @test ConcreteChart(x->2x, unitsquare()) isa Chart{2} |
1558 | 39 end |
40 | |
41 @testset "Atlas" begin | |
42 | |
43 end |