comparison test/Grids/manifolds_test.jl @ 1579:14d79b13b54f feature/grids/manifolds

Add tests, fix bugs, add exports, for Simplex and friends
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 25 Apr 2024 22:14:46 +0200
parents 157c43966b06
children fdee60ab8c4e
comparison
equal deleted inserted replaced
1578:56da785ab576 1579:14d79b13b54f
30 end 30 end
31 31
32 @testset "Simplex" begin 32 @testset "Simplex" begin
33 @test Simplex([1,2], [3,4]) isa Simplex{Int, 2} 33 @test Simplex([1,2], [3,4]) isa Simplex{Int, 2}
34 @test Simplex([1,2,3], [4,5,6],[1,1,1]) isa Simplex{Int, 3} 34 @test Simplex([1,2,3], [4,5,6],[1,1,1]) isa Simplex{Int, 3}
35
36 @test verticies(Simplex([1,2], [3,4])) == ([1,2], [3,4])
37
38 @test unittriangle() isa Simplex{Float64,2}
39 @test verticies(unittriangle()) == ([0,0], [1,0], [0,1])
40
41 @test unittetrahedron() isa Simplex{Float64,3}
42 @test verticies(unittetrahedron()) == ([0,0,0], [1,0,0], [0,1,0],[0,0,1])
43
44 @test unitsimplex(4) isa Simplex{Float64,4}
35 end 45 end
36 46
37 @testset "Chart" begin 47 @testset "Chart" begin
38 end 48 end
39 49