Skip to content

Commit

Permalink
add test for is_real
Browse files Browse the repository at this point in the history
  • Loading branch information
PBrdng committed Jan 18, 2024
1 parent eb39944 commit 69d1c38
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/systems_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,12 @@ end
G = SlicedSystem(g, L)
test_system(G, System(G))
end

@testset "is_real" begin
@var x
f = System([x - 1])
g = System([x - 1 + 1e-16 * im])
@test ModelKit.is_real(fixed(f)) == true
@test ModelKit.is_real(fixed(g)) == false
end
end

0 comments on commit 69d1c38

Please sign in to comment.