Skip to content

Commit

Permalink
tests: check if area_heron_triangle throws when input sides do not …
Browse files Browse the repository at this point in the history
…form a triangle (#189)
  • Loading branch information
vil02 authored Oct 4, 2023
1 parent 40586f4 commit 1ba04f5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ using TheAlgorithms.Math
@test_throws DomainError area_heron_triangle(-1, -2, 1)
@test_throws DomainError area_heron_triangle(1, -2, 1)
@test_throws DomainError area_heron_triangle(-1, 2, 1)
@test_throws DomainError area_heron_triangle(1, 1, 3)
@test_throws DomainError area_heron_triangle(1, 3, 1)
@test_throws DomainError area_heron_triangle(3, 1, 1)

@test area_parallelogram(10, 20) == 200
@test_throws DomainError area_parallelogram(-1, -2)
Expand Down

0 comments on commit 1ba04f5

Please sign in to comment.