aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorinoas <mail@inoas.com>2022-04-12 20:43:00 +0200
committerLouis Pilfold <louis@lpil.uk>2022-04-16 10:23:34 +0100
commit772a6a78feae898e279735795cfc347e19944e5b (patch)
treef519de3b2cf43ba9d9c0d9f7a49eb698cc551f0c /test
parent0280b90102d02705a58434ca5b9b2e7fa95b1b00 (diff)
downloadgleam_stdlib-772a6a78feae898e279735795cfc347e19944e5b.tar.gz
gleam_stdlib-772a6a78feae898e279735795cfc347e19944e5b.zip
fix --target javascript stack size limit issue on tests
Diffstat (limited to 'test')
-rw-r--r--test/gleam/float_test.gleam13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/gleam/float_test.gleam b/test/gleam/float_test.gleam
index d51d369..8234045 100644
--- a/test/gleam/float_test.gleam
+++ b/test/gleam/float_test.gleam
@@ -391,12 +391,13 @@ pub fn random_between_test() {
with: fn(acc, _element) { acc +. float.random_between(min, max) },
)
|> fn(sum) { sum /. int.to_float(iterations) }
- |> float.loosely_compare(expected_average, 0.1)
+ // |> function.tap(fn(sum) { should.equal(sum, expected_average) })
+ |> float.loosely_compare(expected_average, 3.0)
|> should.equal(order.Eq)
}
- run_mean_tests(100_000, 0.0, 0.0)
- run_mean_tests(100_000, 0.0, 10.0)
- run_mean_tests(100_000, -10.0, 10.0)
- run_mean_tests(100_000, -10.0, 0.0)
- run_mean_tests(100_000, 0.0, -10.0)
+ run_mean_tests(100, 0.0, 0.0)
+ run_mean_tests(1000, 0.0, 100.0)
+ run_mean_tests(1000, -100.0, 100.0)
+ run_mean_tests(1000, -100.0, 0.0)
+ run_mean_tests(1000, 0.0, -100.0)
}