Skip to content

Commit e042253

Browse files
committed
Add trivial tests
1 parent 0789a30 commit e042253

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/Multivariate/TensorSpace.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,13 @@ function points(d::BivariateSpace,n,m,k)
572572

573573
T = promote_eltypeof(ptsx, ptst)
574574

575-
if k == 1
575+
A = if k == 1
576576
repeat(ptsx, 1, m)
577577
else # k == 2
578578
repeat(reshape(ptst, 1, m), n)
579579
end
580+
581+
convert(AbstractArray{T}, A)
580582
end
581583

582584

test/SpacesTest.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,13 @@ using LinearAlgebra
295295
@test a == a
296296
@test a != b
297297
end
298+
299+
@testset "points" begin
300+
S = PointSpace(1:4) PointSpace(1:4)
301+
P = points(S, 4, 4)
302+
@test P[1] == repeat(1:4, 1, 4)
303+
@test P[2] == repeat((1:4)', 4, 1)
304+
end
298305
end
299306

300307
@testset "ConstantSpace" begin

0 commit comments

Comments
 (0)