Skip to content

Commit b510c79

Browse files
committed
Split benchmark definition and test
1 parent e6f621f commit b510c79

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

benchmark/main.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Test
2+
using SciMLBase, Sundials
3+
4+
include("thermalfluid.jl")
5+
6+
Benchmark{3}()()
7+
@test isa(code_lowered(DAECompiler.factory, Tuple{Val{DAECompiler.Settings(mode=DAECompiler.DAENoInit)}, Benchmark{3}})[1], Core.CodeInfo)
8+
let sol = solve(DAECProblem(Benchmark{3}(), [1:9;] .=> 0.), IDA())
9+
@test_broken sol.retcode == ReturnCode.Success
10+
end

benchmark/thermalfluid.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ using DAECompiler
22
using DAECompiler.Intrinsics
33
using Polynomials: fit
44
using XSteam: my_pT, rho_pT, Cp_pT, tc_pT
5-
using SciMLBase, Sundials
6-
using Test
75

86
struct Sink; end
97
function (::Sink)(inlet)
@@ -282,9 +280,3 @@ function (::Benchmark{N})() where {N}
282280
PreinsulatedPipe{N}()(in[2], out[1])
283281
Sink()(out[2])
284282
end
285-
286-
Benchmark{3}()()
287-
@test isa(code_lowered(DAECompiler.factory, Tuple{Val{DAECompiler.Settings(mode=DAECompiler.DAENoInit)}, Benchmark{3}})[1], Core.CodeInfo)
288-
let sol = solve(DAECProblem(Benchmark{3}(), [1:9;] .=> 0.), IDA())
289-
@test_broken sol.retcode == ReturnCode.Success
290-
end

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ include("validation.jl")
1111

1212
using Pkg
1313
Pkg.activate(joinpath(dirname(@__DIR__), "benchmark")) do
14-
include("../benchmark/thermalfluid.jl")
14+
include("../benchmark/main.jl")
1515
end

0 commit comments

Comments
 (0)