From 86aa133ac302361cafe0ad04e662db56e0e903ad Mon Sep 17 00:00:00 2001 From: Jakob Nybo Nissen Date: Tue, 17 Oct 2023 12:07:26 +0200 Subject: [PATCH] Tests: Do not assume empty vectors alias Currently, TS uses Base.mightalias to throw an error if the two inputs to three- arg transcode alias. Two problems here: Base.mightalias is internal, and the new memory PR to Julia changes aliasing of zero-length arrays. The temporary fix for now is to remove the test that tests that zero-length arrays trips the Base.mightalias. Later, let's fix this properly by not relying on Base internals in TS tests. --- Project.toml | 2 +- test/codecnoop.jl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index c659e1d2..ea79fd4b 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "TranscodingStreams" uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" license = "MIT" authors = ["Kenta Sato "] -version = "0.10.0" +version = "0.10.1" [deps] Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" diff --git a/test/codecnoop.jl b/test/codecnoop.jl index 08eb696e..23064d69 100644 --- a/test/codecnoop.jl +++ b/test/codecnoop.jl @@ -189,8 +189,9 @@ @test transcode(Noop, data) == data @test transcode(Noop, data) !== data - data = Vector{UInt8}() - @test TranscodingStreams.unsafe_transcode!(Noop(), data, data) == data + data = UInt8[] + @test transcode(Noop(), data, data) == data + data = [0x01, 0x02] @test_throws AssertionError transcode(Noop(), data, data) data = b"" @test transcode(Noop(), data) == data