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 4bce889 commit e80758c
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 e80758c

Please sign in to comment.