Skip to content

Commit

Permalink
♻️ Remove custom test runner bits.
Browse files Browse the repository at this point in the history
  • Loading branch information
hayleigh-dot-dev committed Dec 19, 2023
1 parent 4e8b6f8 commit 449eac6
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 48 deletions.
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
8 changes: 5 additions & 3 deletions test/gleam_community_maths_test.gleam
Original file line number Diff line number Diff line change
@@ -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()
}

0 comments on commit 449eac6

Please sign in to comment.