Skip to content

Commit

Permalink
fix compile test to be world-aware
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Sep 23, 2016
1 parent 40cf848 commit f3b35db
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/compile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,14 @@ try
end
wait(t)

let Foo = eval(Main, Foo_module)
let Foo = getfield(Main, Foo_module)
@test_throws MethodError Foo.foo(17) # world shouldn't be visible yet
end
@eval let Foo_module = $(QuoteNode(Foo_module)), # use @eval to see the results of loading the compile
Foo = getfield(Main, Foo_module),
dir = $(QuoteNode(dir)),
cachefile = $(QuoteNode(cachefile)),
Foo_file = $(QuoteNode(Foo_file))
@test Foo.foo(17) == 18
@test Foo.Bar.bar(17) == 19

Expand Down

0 comments on commit f3b35db

Please sign in to comment.