From 1ba04f5c3984da98eb0d0a151f729e6445c6488b Mon Sep 17 00:00:00 2001 From: Piotr Idzik <65706193+vil02@users.noreply.github.com> Date: Wed, 4 Oct 2023 13:38:40 +0200 Subject: [PATCH] tests: check if `area_heron_triangle` throws when input sides do not form a triangle (#189) --- test/math.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/math.jl b/test/math.jl index fb3ac0d0..719ccc63 100644 --- a/test/math.jl +++ b/test/math.jl @@ -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)