Skip to content

Commit

Permalink
test: update tests caused by AbstractVector subtype removal
Browse files Browse the repository at this point in the history
  • Loading branch information
sathvikbhagavan committed May 6, 2024
1 parent ed80ad2 commit 2939808
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 0 additions & 2 deletions test/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ u = 2.0collect(1:10)
t = 1.0collect(1:10)
A = LinearInterpolation(u, t)

@test length(A) == 20
for i in 1:10
@test u[i] == A[i]
end
Expand All @@ -13,7 +12,6 @@ for i in 11:20
end

A = LinearInterpolation{false}(u, t, true)
@test length(A) == 10
for i in 1:10
@test u[i] == A[i]
end
Expand Down
8 changes: 6 additions & 2 deletions test/online_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ u = [0, 1, 0]
for di in [LinearInterpolation, QuadraticInterpolation, ConstantInterpolation]
li = di(copy(u), copy(t))
append!(li, u, t)
@test li == di(vcat(u, u), vcat(t, t))
li2 = di(vcat(u, u), vcat(t, t))
@test li.u == li2.u
@test li.t == li2.t

li = di(copy(u), copy(t))
push!(li, 1, 4)
@test li == di(vcat(u, 1), vcat(t, 4))
li2 = di(vcat(u, 1), vcat(t, 4))
@test li.u == li2.u
@test li.t == li2.t
end

0 comments on commit 2939808

Please sign in to comment.