Skip to content

Commit

Permalink
properly crash runner_task in tests. tests for async_map
Browse files Browse the repository at this point in the history
  • Loading branch information
shashi committed Nov 14, 2015
1 parent 1fcb7d9 commit 3c9a5ea
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions test/async.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

facts("Async") do

context("async_map") do
x = Input(1)
t, y = async_map(-, 0, x)

@fact value(t) --> nothing
@fact value(y) --> 0

push!(x, 2)
step()
step()

@fact value(y) --> -2
end
end
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using Reactive

# Stop the runner task
try
throwto(Reactive.runner_task, InterruptException())
Base.throwto(Reactive.runner_task, InterruptException())
catch
end

Expand All @@ -11,4 +11,5 @@ include("basics.jl")
include("call_count.jl")
include("flatten.jl")
include("time.jl")
include("async.jl")
FactCheck.exitstatus()

0 comments on commit 3c9a5ea

Please sign in to comment.