|
43 | 43 | @test A(11) == 22
|
44 | 44 |
|
45 | 45 | u = vcat(2.0collect(1:10)', 3.0collect(1:10)')
|
46 |
| - A = @inferred(LinearInterpolation( |
47 |
| - u, t; extrapolation = ExtrapolationType.Extension)) |
| 46 | + @test @inferred(LinearInterpolation( |
| 47 | + u, t; extrapolation = ExtrapolationType.Extension)) isa LinearInterpolation broken=VERSION < |
| 48 | + v"1.11" && |
| 49 | + t isa |
| 50 | + AbstractRange |
| 51 | + A = LinearInterpolation( |
| 52 | + u, t; extrapolation = ExtrapolationType.Extension) |
48 | 53 |
|
49 | 54 | for (_t, _u) in zip(t, eachcol(u))
|
50 | 55 | @test A(_t) == _u
|
|
57 | 62 | y = 2:4
|
58 | 63 | u_ = x' .* y
|
59 | 64 | u = [u_[:, i] for i in 1:size(u_, 2)]
|
60 |
| - A = @inferred(LinearInterpolation( |
61 |
| - u, t; extrapolation = ExtrapolationType.Extension)) |
| 65 | + @test @inferred(LinearInterpolation( |
| 66 | + u, t; extrapolation = ExtrapolationType.Extension)) isa LinearInterpolation broken=VERSION < |
| 67 | + v"1.11" && |
| 68 | + t isa |
| 69 | + AbstractRange |
| 70 | + A = LinearInterpolation( |
| 71 | + u, t; extrapolation = ExtrapolationType.Extension) |
62 | 72 | @test A(0) == [0.0, 0.0, 0.0]
|
63 | 73 | @test A(5.5) == [11.0, 16.5, 22.0]
|
64 | 74 | @test A(11) == [22.0, 33.0, 44.0]
|
|
260 | 270 |
|
261 | 271 | # Matrix interpolation test
|
262 | 272 | u = [1.0 4.0 9.0 16.0; 1.0 4.0 9.0 16.0]
|
263 |
| - A = @inferred(QuadraticInterpolation(u, t; extrapolation = ExtrapolationType.Extension)) |
| 273 | + @test @inferred(QuadraticInterpolation( |
| 274 | + u, t; extrapolation = ExtrapolationType.Extension)) isa QuadraticInterpolation broken=VERSION < |
| 275 | + v"1.11" |
| 276 | + A = QuadraticInterpolation(u, t; extrapolation = ExtrapolationType.Extension) |
264 | 277 |
|
265 | 278 | for (_t, _u) in zip(t, eachcol(u))
|
266 | 279 | @test A(_t) == _u
|
|
568 | 581 |
|
569 | 582 | u_ = [0.0, 1.0, 3.0]' .* ones(4)
|
570 | 583 | u = [u_[:, i] for i in 1:size(u_, 2)]
|
571 |
| - A = @inferred(QuadraticSpline(u, t; extrapolation = ExtrapolationType.Extension)) |
| 584 | + A = QuadraticSpline(u, t; extrapolation = ExtrapolationType.Extension) |
572 | 585 | @test A(-2.0) == P₁(-2.0) * ones(4)
|
573 | 586 | @test A(-0.5) == P₁(-0.5) * ones(4)
|
574 | 587 | @test A(0.7) == P₁(0.7) * ones(4)
|
|
617 | 630 |
|
618 | 631 | u_ = [0.0, 1.0, 3.0]' .* ones(4)
|
619 | 632 | u = [u_[:, i] for i in 1:size(u_, 2)]
|
620 |
| - A = @inferred(CubicSpline(u, t; extrapolation = ExtrapolationType.Extension)) |
| 633 | + @test @inferred(CubicSpline(u, t; extrapolation = ExtrapolationType.Extension)) isa |
| 634 | + CubicSpline broken=VERSION < v"1.11" |
| 635 | + A = CubicSpline(u, t; extrapolation = ExtrapolationType.Extension) |
621 | 636 | for x in (-1.5, -0.5, -0.7)
|
622 | 637 | @test A(x) ≈ P₁(x) * ones(4)
|
623 | 638 | end
|
|
0 commit comments