Skip to content

Commit 1ba04f5

Browse files
authored
tests: check if area_heron_triangle throws when input sides do not form a triangle (#189)
1 parent 40586f4 commit 1ba04f5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/math.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ using TheAlgorithms.Math
5959
@test_throws DomainError area_heron_triangle(-1, -2, 1)
6060
@test_throws DomainError area_heron_triangle(1, -2, 1)
6161
@test_throws DomainError area_heron_triangle(-1, 2, 1)
62+
@test_throws DomainError area_heron_triangle(1, 1, 3)
63+
@test_throws DomainError area_heron_triangle(1, 3, 1)
64+
@test_throws DomainError area_heron_triangle(3, 1, 1)
6265

6366
@test area_parallelogram(10, 20) == 200
6467
@test_throws DomainError area_parallelogram(-1, -2)

0 commit comments

Comments
 (0)