Skip to content

Commit df8cb0e

Browse files
authored
Update transducer.jl
1 parent 8d7f22f commit df8cb0e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/transducer.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
chain = sample(
7171
MyModel(), MySampler(), N; discard_initial=discard_initial, progress=false
7272
)
73-
@test all(as[i] === chain[i].a for i in 1:N)
74-
@test all(bs[i] === chain[i].b for i in 1:N)
73+
@test all(as[i] == chain[i].a for i in 1:N)
74+
@test all(bs[i] == chain[i].b for i in 1:N)
7575
end
7676

7777
@testset "Thin chain by a factor of `thinning`" begin
@@ -92,7 +92,8 @@
9292
# Repeat sampling with `sample`.
9393
Random.seed!(1234)
9494
chain = sample(MyModel(), MySampler(), N; thinning=thinning, progress=false)
95-
@test all(as[i] === chain[i].a for i in 1:N)
96-
@test all(bs[i] === chain[i].b for i in 1:N)
95+
@test as[1] === chain[1].a === missing
96+
@test all(as[i] == chain[i].a for i in 2:N)
97+
@test all(bs[i] == chain[i].b for i in 1:N)
9798
end
9899
end

0 commit comments

Comments
 (0)