Skip to content

Commit

Permalink
add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
max-vassili3v committed Aug 28, 2024
1 parent 4cab039 commit c63d44e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,12 @@ import BandedMatrices: rowstart, rowstop, colstart, colstop,
@test_throws BoundsError a[0, BandRange] = [1, 2, 3]
@test_throws BoundsError a[9, BandRange] = [1, 2, 3]
@test_throws DimensionMismatch a[1, BandRange] = [1, 2]

a = BandedMatrix(ones(2, 5), (-2, 2))
# 0.0 0.0 1.0 0.0 0.0
# 0.0 0.0 0.0 1.0 0.0
@test a[1,:] == [0, 0, 1, 0, 0]
@test a[2,:] == [0, 0, 0, 1, 0]
end


Expand Down

0 comments on commit c63d44e

Please sign in to comment.