mirror of
https://github.com/sigmasternchen/gleam-community-maths
synced 2025-03-15 07:59:01 +00:00
♻️ Remove custom test runner bits.
This commit is contained in:
parent
4e8b6f8c3d
commit
449eac64b8
10 changed files with 5 additions and 48 deletions
|
@ -1,11 +1,6 @@
|
|||
import gleam_community/maths/arithmetics
|
||||
import gleeunit
|
||||
import gleeunit/should
|
||||
|
||||
pub fn main() {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
||||
pub fn int_gcd_test() {
|
||||
arithmetics.gcd(1, 1)
|
||||
|> should.equal(1)
|
|
@ -1,13 +1,8 @@
|
|||
import gleam_community/maths/combinatorics
|
||||
import gleam/set
|
||||
import gleam/list
|
||||
import gleeunit
|
||||
import gleeunit/should
|
||||
|
||||
pub fn main() {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
||||
pub fn int_factorial_test() {
|
||||
// Invalid input gives an error
|
||||
combinatorics.factorial(-1)
|
|
@ -1,13 +1,8 @@
|
|||
import gleam_community/maths/elementary
|
||||
import gleam_community/maths/predicates
|
||||
import gleam_community/maths/conversion
|
||||
import gleeunit
|
||||
import gleeunit/should
|
||||
|
||||
pub fn main() {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
||||
pub fn float_to_degree_test() {
|
||||
let assert Ok(tol) = elementary.power(-10.0, -6.0)
|
||||
conversion.radians_to_degrees(0.0)
|
|
@ -1,13 +1,8 @@
|
|||
import gleam_community/maths/elementary
|
||||
import gleam_community/maths/predicates
|
||||
import gleeunit
|
||||
import gleeunit/should
|
||||
import gleam/option
|
||||
|
||||
pub fn main() {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
||||
pub fn float_acos_test() {
|
||||
let assert Ok(tol) = elementary.power(-10.0, -6.0)
|
||||
// Check that the function agrees, at some arbitrary input
|
|
@ -1,13 +1,8 @@
|
|||
import gleam_community/maths/elementary
|
||||
import gleam_community/maths/metrics
|
||||
import gleam_community/maths/predicates
|
||||
import gleeunit
|
||||
import gleeunit/should
|
||||
|
||||
pub fn main() {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
||||
pub fn float_list_norm_test() {
|
||||
let assert Ok(tol) = elementary.power(-10.0, -6.0)
|
||||
|
|
@ -1,14 +1,9 @@
|
|||
import gleam_community/maths/piecewise
|
||||
import gleeunit
|
||||
import gleeunit/should
|
||||
import gleam/option
|
||||
import gleam/float
|
||||
import gleam/int
|
||||
|
||||
pub fn main() {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
||||
pub fn float_ceiling_test() {
|
||||
// Round 3. digit AFTER decimal point
|
||||
piecewise.ceiling(12.0654, option.Some(3))
|
|
@ -1,11 +1,6 @@
|
|||
import gleam_community/maths/predicates
|
||||
import gleam/list
|
||||
import gleeunit/should
|
||||
import gleeunit
|
||||
|
||||
pub fn main() {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
||||
pub fn float_is_close_test() {
|
||||
let val: Float = 99.0
|
|
@ -2,13 +2,8 @@ import gleam_community/maths/elementary
|
|||
import gleam_community/maths/sequences
|
||||
import gleam_community/maths/predicates
|
||||
import gleam/list
|
||||
import gleeunit
|
||||
import gleeunit/should
|
||||
|
||||
pub fn main() {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
||||
pub fn float_list_linear_space_test() {
|
||||
let assert Ok(tol) = elementary.power(-10.0, -6.0)
|
||||
|
|
@ -1,14 +1,9 @@
|
|||
import gleam_community/maths/elementary
|
||||
import gleam_community/maths/special
|
||||
import gleam_community/maths/predicates
|
||||
import gleeunit
|
||||
import gleeunit/should
|
||||
import gleam/result
|
||||
|
||||
pub fn main() {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
||||
pub fn float_beta_function_test() {
|
||||
let assert Ok(tol) = elementary.power(-10.0, -6.0)
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
@external(erlang, "gleam_community_maths_test_ffi", "main")
|
||||
@external(javascript, "./gleam_community_maths_test_ffi.mjs", "main")
|
||||
pub fn main() -> Nil
|
||||
import gleeunit
|
||||
|
||||
pub fn main() {
|
||||
gleeunit.main()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue