Skip to content

Commit ae1f4e4

Browse files
committed
add tests
1 parent 5ea0373 commit ae1f4e4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/general_lbc.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ x = rand(1000)
4040
y = view(x, 1:900)
4141
@inferred cache[y]
4242
@test 0 == @allocated cache[y]
43+
@test cache[y] === get_tmp(cache, y)
4344

4445
cache_17 = LazyBufferCache(Returns(17))
4546
x = 1:10
@@ -52,3 +53,4 @@ cache = GeneralLazyBufferCache(T -> Vector{T}(undef, 1000))
5253
# @inferred cache[Float64]
5354
cache[Float64] # generate the buffer
5455
@test 0 == @allocated cache[Float64]
56+
@test get_tmp(cache, Float64) === cache[Float64]

0 commit comments

Comments
 (0)