Skip to content

Commit

Permalink
Test null-array API
Browse files Browse the repository at this point in the history
  • Loading branch information
emmt committed Sep 26, 2023
1 parent e2f1673 commit 5159f7e
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 @@ -21,6 +21,15 @@ optimizer(algo::Symbol) =
for status in instances(PRIMA.Status)
@test PRIMA.reason(status) isa String
end
# Check NULL-array API.
let NullArray = PRIMA.NullArray
A = NullArray{Int16,3}()
@test eltype(A) === Int16
@test size(A) == (0,0,0)
@test axes(A) == (1:0,1:0,1:0)
@test length(A) == 0
@test pointer(A) === Ptr{Int16}(0)
end
end

@testset "Simple objective function" begin
Expand Down

0 comments on commit 5159f7e

Please sign in to comment.