From 1795d7f8c7b74c943f851521dcf1cdf2bab37a9b Mon Sep 17 00:00:00 2001 From: hyrodium Date: Sat, 11 Nov 2023 15:35:25 +0900 Subject: [PATCH] add tests for `SubKnotVector` --- test/test_KnotVector.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/test_KnotVector.jl b/test/test_KnotVector.jl index 1488744c1..3c7baa52a 100644 --- a/test/test_KnotVector.jl +++ b/test/test_KnotVector.jl @@ -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