Skip to content

Commit

Permalink
define helper functions in tests only once
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Mar 2, 2024
1 parent 6fd2578 commit 37346fd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions test/continuous.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ p = 2x^2 - 3x + y
sdp = 2

# blackbox system
add_one(x) = x .+ 1
add_one(x, u) = x .+ 1 .+ u
add_one(x, u, w) = x .+ 1 .+ u .+ w
state = [1.0; 2.0]
input = 1
noise = [3.0; 1.0]
Expand Down
3 changes: 0 additions & 3 deletions test/discrete.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ p = 2x^2 - 3x + y
sdp = 2

# blackbox system
add_one(x) = x .+ 1
add_one(x, u) = x .+ 1 .+ u
add_one(x, u, w) = x .+ 1 .+ u .+ w
state = [1.0; 2.0]
input = 1
noise = [3.0; 1.0]
Expand Down
3 changes: 3 additions & 0 deletions test/helper_functions.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add_one(x) = x .+ 1
add_one(x, u) = x .+ 1 .+ u
add_one(x, u, w) = x .+ 1 .+ u .+ w
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ end
@testset "Abstract systems" begin
include("abstract.jl")
end
include("helper_functions.jl")
@testset "Continuous systems" begin
include("continuous.jl")
end
Expand Down

0 comments on commit 37346fd

Please sign in to comment.