File tree Expand file tree Collapse file tree 1 file changed +0
-46
lines changed Expand file tree Collapse file tree 1 file changed +0
-46
lines changed Original file line number Diff line number Diff line change 182
182
@test consume (ttask) == 4
183
183
@test consume (ttask) == 5
184
184
end
185
-
186
- @testset " Array deep copy 2" begin
187
- function f ()
188
- t = Array {Int} (undef, 1 )
189
- t[1 ] = 0
190
- while true
191
- produce (t[1 ])
192
- t[1 ]
193
- t[1 ] = 1 + t[1 ]
194
- end
195
- end
196
-
197
- ttask = TapedTask (nothing , f)
198
-
199
- consume (ttask)
200
- consume (ttask)
201
- a = copy (ttask)
202
- consume (a)
203
- consume (a)
204
-
205
- @test consume (ttask) == 2
206
- @test consume (a) == 4
207
- end
208
-
209
- @testset " ref of dictionary deep copy" begin
210
- function f ()
211
- t = Ref (Dict (" A" => 1 , 5 => " B" ))
212
- t[][" A" ] = 0
213
- for _ in 1 : 6
214
- produce (t[][" A" ])
215
- t[][" A" ] += 1
216
- end
217
- end
218
-
219
- ctask = TapedTask (nothing , f)
220
-
221
- consume (ctask)
222
- consume (ctask)
223
-
224
- a = copy (ctask)
225
- consume (a)
226
- consume (a)
227
-
228
- @test consume (ctask) == 2
229
- @test consume (a) == 4
230
- end
231
185
end
232
186
@testset " Issue: PR-86 (DynamicPPL.jl/pull/261)" begin
233
187
function f ()
You can’t perform that action at this time.
0 commit comments