Skip to content

Commit

Permalink
start adding some tests for comparison operators
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdjscott committed May 15, 2024
1 parent 5d55f02 commit 8c06255
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/comparison_operators.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@testset verbose = true "Comparison operators" begin
@testset "Test ==" begin
DACE.init(10, 4)

x = 1 + DA(1, 1.0)
@test 1 == x

y = DA(1)
@test 1 == y

@test x == y
end

@testset "Test >=" begin
DACE.init(10, 4)

x = 1 + DA(1, 1)
y = DA(2)
@test y >= x
@test y >= 1
@test y >= 2

end

end
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ include("utils.jl")
include("validation_1.jl")
include("validation_2.jl")
end

@testset verbose = true "Operators" begin
include("comparison_operators.jl")
end
end

0 comments on commit 8c06255

Please sign in to comment.