Skip to content

Commit 521eda8

Browse files
authored
Added test for position, seekend, etc. (#34738)
* Added test for the seekend function * Added test for hashing secret buffers * Added test for checking the position
1 parent 4c84b0c commit 521eda8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/secretbuffer.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,14 @@ using Test
8080
@test read(sb, String) == "\xff\xff\xff"
8181
shred!(sb)
8282
end
83+
@testset "position" begin
84+
sb = SecretBuffer("Julia")
85+
println("testing position")
86+
initial_pos = (position(sb))
87+
seek(sb,2)
88+
mid_pos = position(sb)
89+
seekend(sb)
90+
@test initial_pos == 0 && mid_pos == 2 && position(sb)==sb.size
91+
shred!(sb)
92+
end
8393
end

0 commit comments

Comments
 (0)