mirror of
https://github.com/sigmasternchen/gleam-community-maths
synced 2025-03-15 07:59:01 +00:00
fix docs + add another test case
This commit is contained in:
parent
fb7ba54826
commit
5ac794dac8
2 changed files with 5 additions and 0 deletions
|
@ -33,6 +33,7 @@
|
|||
//// * [`is_perfect`](#is_perfect)
|
||||
//// * [`is_even`](#is_even)
|
||||
//// * [`is_odd`](#is_odd)
|
||||
//// * [`is_prime`](#is_prime)
|
||||
|
||||
import gleam/pair
|
||||
import gleam/int
|
||||
|
|
|
@ -138,6 +138,10 @@ pub fn int_is_perfect_test() {
|
|||
}
|
||||
|
||||
pub fn int_is_prime_test() {
|
||||
// Test a negative integer, i.e., not a natural number
|
||||
predicates.is_prime(-7)
|
||||
|> should.equal(False)
|
||||
|
||||
predicates.is_prime(1)
|
||||
|> should.equal(False)
|
||||
|
||||
|
|
Loading…
Reference in a new issue