Skip to content

Commit f1355f0

Browse files
committed
Fix issue 185 test
1 parent 4be4369 commit f1355f0

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

test/copyable_task.jl

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,7 @@
217217
end
218218

219219
@testset "Issue #185" begin
220-
function g(x)
221-
if x > 0
222-
x = 2
223-
else
224-
x = 0.1
225-
end
226-
return produce(x)
227-
end
228-
@test Libtask.consume(Libtask.TapedTask(nothing, g, 1.0)) == 2
220+
g() = produce(randn() > 0 ? 2 : 0.1)
221+
@test Libtask.consume(Libtask.TapedTask(nothing, g)) == 2
229222
end
230223
end

0 commit comments

Comments
 (0)