@@ -3,22 +3,22 @@ using Test
33
44@testset " compress! endOp = :continue" begin
55 data = rand (1 : 100 , 1024 * 1024 )
6- cstream = CodecZstd . CStream ()
7- cstream. ptr = CodecZstd. LibZstd . ZSTD_createCStream ()
8- cstream. ibuffer . src = pointer (data )
9- cstream. ibuffer. size = sizeof (data)
10- cstream. ibuffer. pos = 0
11- cstream. obuffer . dst = Base . Libc . malloc ( sizeof (data) * 2 )
12- cstream. obuffer. size = sizeof (data)* 2
13- cstream. obuffer. pos = 0
14- try
15- GC . @preserve data begin
6+ GC . @preserve data begin
7+ cstream = CodecZstd. CStream ()
8+ cstream. ptr = CodecZstd . LibZstd . ZSTD_createCStream ( )
9+ cstream. ibuffer. src = pointer (data)
10+ cstream. ibuffer. size = sizeof (data)
11+ cstream. ibuffer . pos = 0
12+ cstream. obuffer. dst = Base . Libc . malloc ( sizeof (data)* 2 )
13+ cstream. obuffer. size = sizeof (data) * 2
14+ cstream . obuffer . pos = 0
15+ try
1616 # default endOp
1717 @test CodecZstd. compress! (cstream; endOp= :continue ) == 0
1818 @test CodecZstd. find_decompressed_size (cstream. obuffer. dst, cstream. obuffer. pos) == CodecZstd. ZSTD_CONTENTSIZE_UNKNOWN
19+ finally
20+ Base. Libc. free (cstream. obuffer. dst)
1921 end
20- finally
21- Base. Libc. free (cstream. obuffer. dst)
2222 end
2323end
2424
0 commit comments