@@ -19,20 +19,6 @@ const LT{T} = Union{LVec{<:Any, T}, T}
19
19
const FloatingTypes = Union{Float32, Float64}
20
20
end
21
21
22
- # Stuff for https://github.com/timholy/Revise.jl/issues/550
23
- if Base. VERSION >= v " 1.1"
24
- try
25
- using CBinding
26
- catch
27
- @info " Adding CBinding to the environment for test purposes"
28
- using Pkg
29
- Pkg. add (" CBinding" ) # not available for Julia 1.0
30
- end
31
- eval (:(module Lowering550
32
- using CBinding
33
- end ))
34
- end
35
-
36
22
bodymethtest0 (x) = 0
37
23
function bodymethtest0 (x)
38
24
y = 2 x
@@ -385,19 +371,6 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
385
371
pc = methoddefs! (signatures, frame; define= false )
386
372
@test typeof (Lowering422. fneg) ∈ Set (Base. unwrap_unionall (sig). parameters[1 ] for sig in signatures)
387
373
388
- # https://github.com/timholy/Revise.jl/issues/550
389
- if Base. VERSION >= v " 1.1"
390
- ex = :(@cstruct S {
391
- val:: Int8
392
- })
393
- empty! (signatures)
394
- Core. eval (Lowering550, ex)
395
- frame = Frame (Lowering550, ex)
396
- rename_framemethods! (frame)
397
- pc = methoddefs! (signatures, frame; define= false )
398
- @test ! isempty (signatures) # really we just need to know that `methoddefs!` completed without getting stuck
399
- end
400
-
401
374
# Scoped names (https://github.com/timholy/Revise.jl/issues/568)
402
375
ex = :(f568 () = - 1 )
403
376
Core. eval (Lowering, ex)
@@ -431,4 +404,31 @@ bodymethtest5(x, y=Dict(1=>2)) = 5
431
404
end
432
405
frame = Frame (Lowering, ex)
433
406
rename_framemethods! (frame)
407
+
408
+ # https://github.com/timholy/Revise.jl/issues/550
409
+ if Base. VERSION >= v " 1.4"
410
+ using Pkg
411
+ try
412
+ # we test with the old version of CBinding, let's do it in an isolated environment
413
+ Pkg. activate (; temp= true )
414
+
415
+ @info " Adding CBinding to the environment for test purposes"
416
+ Pkg. add (; name= " CBinding" , version= " 0.9.4" ) # `@cstruct` isn't defined for v1.0 and above
417
+
418
+ m = Module ()
419
+ Core. eval (m, :(using CBinding))
420
+
421
+ ex = :(@cstruct S {
422
+ val:: Int8
423
+ })
424
+ empty! (signatures)
425
+ Core. eval (m, ex)
426
+ frame = Frame (m, ex)
427
+ rename_framemethods! (frame)
428
+ pc = methoddefs! (signatures, frame; define= false )
429
+ @test ! isempty (signatures) # really we just need to know that `methoddefs!` completed without getting stuck
430
+ finally
431
+ Pkg. activate () # back to the original environment
432
+ end
433
+ end
434
434
end
0 commit comments