Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
gerlero committed Jan 28, 2022
1 parent 2886122 commit e56c85d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,12 @@ itp = Interpolator(x, x)
x = collect(range(0, stop=1, length=1000))
itp = Interpolator(x, x)
@test itp(1) == 1

# Regression test for https://github.com/gerlero/PCHIPInterpolation.jl/issues/11
v = [1, 2, 3]
p = Interpolator(v, v)
xs = copy(p.xs)
ys = copy(p.ys)
v .= -1
@test p.xs == xs
@test p.ys == ys

0 comments on commit e56c85d

Please sign in to comment.