|
254 | 254 | @test p + d == P([a+d, b, c])
|
255 | 255 | @test p + P([d]) == P([a+d,b,c])
|
256 | 256 |
|
257 |
| - @test_throws MethodError [p s][1] == p # no promotion T(s) |
258 |
| - @test_throws MethodError [p s][2] == s |
| 257 | + if VERSION < v"1.10" |
| 258 | + @test_throws MethodError [p s][1] == p # no promotion T(s) |
| 259 | + @test_throws MethodError [p s][2] == s |
| 260 | + end |
259 | 261 | end
|
260 | 262 | end
|
261 | 263 |
|
@@ -302,11 +304,13 @@ end
|
302 | 304 |
|
303 | 305 | # implicit promotion
|
304 | 306 | @test_throws MethodError p + s == P([a+s, b, c]) # OK, no a + s
|
305 |
| - @test p + d == P([a+d, b, c]) |
| 307 | + @test p + d == P([a+d, b, c]) |
306 | 308 | @test p + P([d]) == P([a+d,b,c])
|
307 | 309 |
|
308 |
| - @test_throws MethodError [p s][1] == p # no promotion T(s) |
309 |
| - @test_throws MethodError [p s][2] == s |
| 310 | + # For Immutable + v1.10 this [p s] doesn't error, but is |
| 311 | + # error prone |
| 312 | + #@test_throws MethodError [p s][1] == p # no promotion T(s) |
| 313 | + #@test_throws MethodError [p s][2] == s |
310 | 314 | end
|
311 | 315 | end
|
312 | 316 |
|
@@ -1354,7 +1358,8 @@ end
|
1354 | 1358 | p1 = P([1,2,0,3])
|
1355 | 1359 | @test length(collect(p1)) == degree(p1) + 1
|
1356 | 1360 |
|
1357 |
| - @test [p1[idx] for idx in eachindex(p1)] ==ᵗᶻ [1,2,0,3] |
| 1361 | + P != Polynomials.SparseVectorPolynomial && |
| 1362 | + @test norm([p1[idx] for idx in eachindex(p1)] -[1,2,0,3]) ≤ 10*eps() |
1358 | 1363 | end
|
1359 | 1364 | end
|
1360 | 1365 |
|
|
0 commit comments