Skip to content

Commit 3c9a5ea

Browse files
committed
properly crash runner_task in tests. tests for async_map
1 parent 1fcb7d9 commit 3c9a5ea

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

test/async.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
facts("Async") do
3+
4+
context("async_map") do
5+
x = Input(1)
6+
t, y = async_map(-, 0, x)
7+
8+
@fact value(t) --> nothing
9+
@fact value(y) --> 0
10+
11+
push!(x, 2)
12+
step()
13+
step()
14+
15+
@fact value(y) --> -2
16+
end
17+
end

test/runtests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using Reactive
22

33
# Stop the runner task
44
try
5-
throwto(Reactive.runner_task, InterruptException())
5+
Base.throwto(Reactive.runner_task, InterruptException())
66
catch
77
end
88

@@ -11,4 +11,5 @@ include("basics.jl")
1111
include("call_count.jl")
1212
include("flatten.jl")
1313
include("time.jl")
14+
include("async.jl")
1415
FactCheck.exitstatus()

0 commit comments

Comments
 (0)