Skip to content

Commit

Permalink
add tests for SubKnotVector
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium committed Nov 11, 2023
1 parent 39dd3ac commit 1795d7f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/test_KnotVector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@
end

@testset "SubKnotVector and view" begin
k = KnotVector(1:8)
view(k, 1:3) isa SubKnotVector
k = UniformKnotVector(1:8)
view(k, 1:3) isa UniformKnotVector
k1 = KnotVector(1:8)
k2 = UniformKnotVector(1:8)
@test view(k1, 1:3) isa SubKnotVector
@test view(k2, 1:3) isa UniformKnotVector
@test copy(view(k1, 1:3)) isa KnotVector
@test copy(view(k1, 1:3)) == view(k1, 1:3) == KnotVector(1:3) == k1[1:3]
end

@testset "zeros" begin
Expand Down

0 comments on commit 1795d7f

Please sign in to comment.