From e80758c09b4c02bca8aede9164a0d90b1c33d09d Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 23 Sep 2016 14:14:03 -0400 Subject: [PATCH] fix compile test to be world-aware --- test/compile.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/compile.jl b/test/compile.jl index 991026d9a5aa60..4b3012041a6a6b 100644 --- a/test/compile.jl +++ b/test/compile.jl @@ -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