Skip to content

Commit

Permalink
Tests for BitArray mmap (#32893)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt authored and ararslan committed Aug 15, 2019
1 parent d245df9 commit 53397c9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions stdlib/Mmap/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,22 @@ m = Mmap.mmap(s, BitArray, (72,))
@test Test._check_bitarray_consistency(m)
@test length(m) == 72
close(s); finalize(m); m = nothing; GC.gc()

m = Mmap.mmap(file, BitArray, (72,))
@test Test._check_bitarray_consistency(m)
@test length(m) == 72
finalize(m); m = nothing; GC.gc()

s = open(file, "r+")
m = Mmap.mmap(s, BitArray, 72) # len integer instead of dims
@test Test._check_bitarray_consistency(m)
@test length(m) == 72
close(s); finalize(m); m = nothing; GC.gc()

m = Mmap.mmap(file, BitArray, 72) # len integer instead of dims
@test Test._check_bitarray_consistency(m)
@test length(m) == 72
finalize(m); m = nothing; GC.gc()
rm(file)

# Mmap.mmap with an offset
Expand Down

0 comments on commit 53397c9

Please sign in to comment.