|
14 | 14 | using JET |
15 | 15 | using SciMLBase: successful_retcode |
16 | 16 | include("optimization_trimmable.jl") |
17 | | - @test successful_retcode(TestModuleClean.minimize(1.0).retcode) |
| 17 | + @test successful_retcode(TestModuleTrimmable.minimize(1.0).retcode) |
18 | 18 | # can't use `@test_opt` macro here because it would try to eval before |
19 | 19 | # `using JET` is processed |
20 | 20 | test_opt(TestModuleTrimmable.minimize, (typeof(1.0),)) |
|
44 | 44 | ) |
45 | 45 | @test isfile(JULIAC) |
46 | 46 |
|
47 | | - for (mainfile, shouldpass) in [("main_trimmable.jl", true), |
48 | | - ("main_clean.jl", false)] |
| 47 | + for (mainfile, expectedtopass) in [ |
| 48 | + ("main_trimmable.jl", true), |
| 49 | + ("main_clean.jl", false), |
| 50 | + ] |
49 | 51 | binpath = tempname() |
50 | 52 | cmd = `$(Base.julia_cmd()) --project=. --depwarn=error $(JULIAC) --experimental --trim=unsafe-warn --output-exe $(binpath) $(mainfile)` |
51 | 53 |
|
|
58 | 60 | # Instead we use `_execute` to also capture `stdout` and `stderr`. |
59 | 61 | # @test success(setenv(cmd, clean_env)) |
60 | 62 | trimcall = _execute(setenv(cmd, clean_env; dir = @__DIR__)) |
61 | | - if trimcall.exitcode != 0 && shouldpass |
| 63 | + if trimcall.exitcode != 0 && expectedtopass |
62 | 64 | @show trimcall.stdout |
63 | 65 | @show trimcall.stderr |
64 | 66 | end |
65 | | - @test trimcall.exitcode == 0 broken=!shouldpass |
66 | | - @test isfile(binpath) broken=!shouldpass |
67 | | - @test success(`$(binpath) 1.0`) broken=!shouldpass |
| 67 | + @test trimcall.exitcode == 0 broken = !expectedtopass |
| 68 | + @test isfile(binpath) broken = !expectedtopass |
| 69 | + @test success(`$(binpath) 1.0`) broken = !expectedtopass |
68 | 70 | end |
69 | 71 | end |
0 commit comments