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 86aa133
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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 <[email protected]>"]
version = "0.10.0"
version = "0.10.1"

[deps]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
5 changes: 3 additions & 2 deletions 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}()
@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
Expand Down

0 comments on commit 86aa133

Please sign in to comment.