Skip to content

Commit 5f5a416

Browse files
authored
Add test for solve_quadratic_equation with no solution (#21)
1 parent 1c41186 commit 5f5a416

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.spec/math/solve_quadratic_equation_spec.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,7 @@ describe("Quadratic equation solving", function()
2929
assert.equal(complex.new(0, 0), a ^ 2 + p * a + q)
3030
assert.equal(complex.new(0, 0), b ^ 2 + p * b + q)
3131
end)
32+
it("handles the case with no real solutions", function()
33+
assert.equal(solve_quadratic_equation(0, 1), nil)
34+
end)
3235
end)

0 commit comments

Comments
 (0)