1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-13 14:00:27 +01:00
PropertyT.jl/test/roots.jl

11 lines
408 B
Julia
Raw Normal View History

2023-05-09 01:02:39 +02:00
using PropertyT.Roots
@testset "Roots" begin
@test Roots.Root{3,Int}([1, 2, 3]) isa Roots.AbstractRoot{}
@test Roots.Root([1, 2, 3]) isa Roots.AbstractRoot{3,Int}
# io
r = Roots.Root{3,Int}([1, 2, 3])
@test contains(sprint(show, MIME"text/plain"(), r), "of length √14\n")
r = Roots.Root{3,Int}([1, 2, 2])
@test contains(sprint(show, MIME"text/plain"(), r), "of length 3\n")
end