@@ -10,21 +10,21 @@ import ContinuumArrays: basis, AdjointBasisLayout, ExpansionLayout, BasisLayout,
10
10
@test axes (H) ≡ (axes (H,1 ),axes (H,2 )) ≡ (Inclusion (1 .. 3 ), Base. OneTo (2 ))
11
11
@test size (H) ≡ (size (H,1 ),size (H,2 )) ≡ (ℵ₁, 2 )
12
12
13
- @test_throws BoundsError H[0.1 , 1 ]
13
+ @test_throws BoundsError (H, ( 0.1 , 1 )) H[0.1 , 1 ]
14
14
@test H[1.1 ,1 ] ≡ H' [1 ,1.1 ] ≡ transpose (H)[1 ,1.1 ] ≡ 1.0
15
15
@test H[2.1 ,1 ] ≡ H' [1 ,2.1 ] ≡ transpose (H)[1 ,2.1 ] ≡ 0.0
16
16
@test H[1.1 ,2 ] ≡ 0.0
17
17
@test H[2.1 ,2 ] ≡ 1.0
18
- @test_throws BoundsError H[2.1 ,3 ]
19
- @test_throws BoundsError H' [3 ,2.1 ]
20
- @test_throws BoundsError transpose (H)[3 ,2.1 ]
21
- @test_throws BoundsError H[3.1 ,2 ]
18
+ @test_throws BoundsError (H, ( 2.1 , 3 )) H[2.1 ,3 ]
19
+ @test_throws BoundsError (H, ( 2.1 , 3 )) H' [3 ,2.1 ]
20
+ @test_throws BoundsError (H, ( 2.1 , 3 )) transpose (H)[3 ,2.1 ]
21
+ @test_throws BoundsError (H, ( 3.1 , 2 )) H[3.1 ,2 ]
22
22
23
23
@test all (H[[1.1 ,2.1 ], 1 ] .=== H' [1 ,[1.1 ,2.1 ]] .=== transpose (H)[1 ,[1.1 ,2.1 ]] .=== [1.0 ,0.0 ])
24
24
@test all (H[1.1 ,1 : 2 ] .=== H[1.1 ,:] .=== [1.0 ,0.0 ])
25
25
@test all (H[[1.1 ,2.1 ], 1 : 2 ] .=== [1.0 0.0 ; 0.0 1.0 ])
26
26
27
- @test_throws BoundsError H[[0.1 ,2.1 ], 1 ]
27
+ @test_throws BoundsError (H, ([ 0.1 , 2.1 ], 1 )) H[[0.1 ,2.1 ], 1 ]
28
28
@test MemoryLayout (typeof (H)) == BasisLayout ()
29
29
@test ApplyStyle (* , typeof (H), typeof ([1 ,2 ])) isa MulStyle
30
30
@@ -52,19 +52,19 @@ import ContinuumArrays: basis, AdjointBasisLayout, ExpansionLayout, BasisLayout,
52
52
L = LinearSpline ([1 ,2 ,3 ])
53
53
@test size (L) == (ℵ₁, 3 )
54
54
55
- @test_throws BoundsError L[0.1 , 1 ]
55
+ @test_throws BoundsError (L, ( 0.1 , 1 )) L[0.1 , 1 ]
56
56
@test L[1.1 ,1 ] == L' [1 ,1.1 ] == transpose (L)[1 ,1.1 ] ≈ 0.9
57
57
@test L[2.1 ,1 ] === L' [1 ,2.1 ] === transpose (L)[1 ,2.1 ] === 0.0
58
58
@test L[1.1 ,2 ] ≈ 0.1
59
59
@test L[2.1 ,2 ] ≈ 0.9
60
60
@test L[2.1 ,3 ] == L' [3 ,2.1 ] == transpose (L)[3 ,2.1 ] ≈ 0.1
61
- @test_throws BoundsError L[3.1 ,2 ]
61
+ @test_throws BoundsError (L, ( 3.1 , 2 )) L[3.1 ,2 ]
62
62
63
63
@test L[[1.1 ,2.1 ], 1 ] == L' [1 ,[1.1 ,2.1 ]] == transpose (L)[1 ,[1.1 ,2.1 ]] ≈ [0.9 ,0.0 ]
64
64
@test L[1.1 ,1 : 2 ] ≈ [0.9 ,0.1 ]
65
65
@test L[[1.1 ,2.1 ], 1 : 2 ] ≈ [0.9 0.1 ; 0.0 0.9 ]
66
66
67
- @test_throws BoundsError L[[0.1 ,2.1 ], 1 ]
67
+ @test_throws BoundsError (L, ([ 0.1 , 2.1 ], 1 )) L[[0.1 ,2.1 ], 1 ]
68
68
end
69
69
70
70
@testset " Expansion" begin
@@ -254,7 +254,7 @@ import ContinuumArrays: basis, AdjointBasisLayout, ExpansionLayout, BasisLayout,
254
254
@test B1 isa SubQuasiArray{Float64,1 }
255
255
@test size (B1) == (ℵ₁,)
256
256
@test B1[0.1 ] == L[0.1 ,1 ]
257
- @test_throws BoundsError B1[2.2 ]
257
+ @test_throws BoundsError (B1, ( 2.2 ,)) B1[2.2 ]
258
258
259
259
B = view (L,:,1 : 2 )
260
260
@test B isa SubQuasiArray{Float64,2 }
@@ -267,8 +267,8 @@ import ContinuumArrays: basis, AdjointBasisLayout, ExpansionLayout, BasisLayout,
267
267
@test L[:,2 : 3 ] isa SubQuasiArray
268
268
@test axes (L[:,2 : 3 ]) ≡ (Inclusion (1 .. 4 ), Base. OneTo (2 ))
269
269
@test L[:,2 : 3 ][1.1 ,1 ] == L[1.1 ,2 ]
270
- @test_throws BoundsError L[0.1 ,1 ]
271
- @test_throws BoundsError L[1.1 ,0 ]
270
+ @test_throws BoundsError (L, ( 0.1 , 1 )) L[0.1 ,1 ]
271
+ @test_throws BoundsError (L, ( 1.1 , 0 )) L[1.1 ,0 ]
272
272
273
273
@test MemoryLayout (typeof (L[:,2 : 3 ])) isa SubBasisLayout
274
274
@test L\ L[:,2 : 3 ] isa BandedMatrix
@@ -600,8 +600,8 @@ import ContinuumArrays: basis, AdjointBasisLayout, ExpansionLayout, BasisLayout,
600
600
@test isinf (S[1 ,1 ])
601
601
@test iszero (S[1 ,2 ])
602
602
@test iszero (S[0 ,:])
603
- @test_throws BoundsError S[0.1 ,0 ]
604
- @test_throws BoundsError S[- 1 ,1 ]
603
+ @test_throws BoundsError (S, ( 0.1 , 0 )) S[0.1 ,0 ]
604
+ @test_throws BoundsError (S, ( - 1 , 1 )) S[- 1 ,1 ]
605
605
606
606
@test S \ diff (H) == diagm (0 => fill (- 1 ,4 ), 1 => fill (1 , 4 ))[1 : end - 1 ,:]
607
607
0 commit comments