Skip to content

Commit

Permalink
Tests: Do not assume empty vectors alias
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jakobnissen committed Oct 17, 2023
1 parent 1cb583d commit eb80308
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "TranscodingStreams"
uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
license = "MIT"
authors = ["Kenta Sato <bicycle1885@gmail.com>"]
version = "0.10.0"
version = "0.10.1"

[deps]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
3 changes: 2 additions & 1 deletion test/codecnoop.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@
@test transcode(Noop, data) == data
@test transcode(Noop, data) !== data

data = Vector{UInt8}()
data = UInt8[]
@test TranscodingStreams.unsafe_transcode!(Noop(), data, data) == data
data = [0x01, 0x02]
@test_throws AssertionError transcode(Noop(), data, data)
data = b""
@test transcode(Noop(), data) == data
Expand Down

0 comments on commit eb80308

Please sign in to comment.