From 580fd9d7bde8a0bf79139765634a63c515f5a458 Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Sat, 19 Nov 2022 14:02:11 +0000 Subject: v0.25.0 --- test/gleam/list_test.gleam | 8 -------- test/gleam/string_test.gleam | 24 ------------------------ test/gleam_stdlib_test_ffi.mjs | 2 +- 3 files changed, 1 insertion(+), 33 deletions(-) (limited to 'test') diff --git a/test/gleam/list_test.gleam b/test/gleam/list_test.gleam index 83cf60d..d09dfc0 100644 --- a/test/gleam/list_test.gleam +++ b/test/gleam/list_test.gleam @@ -1095,14 +1095,6 @@ pub fn combinations_test() { list.combinations([1, 2, 3, 4], 3) |> should.equal([[1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]]) - - // TCO test - case recursion_test_cycles > 2 { - True -> - list.range(1, 20) - |> list.combinations(20 / 2) - False -> [] - } } pub fn combination_pairs_test() { diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam index f330e6d..88840fd 100644 --- a/test/gleam/string_test.gleam +++ b/test/gleam/string_test.gleam @@ -3,19 +3,6 @@ import gleam/order import gleam/should import gleam/string -if erlang { - const recursion_test_cycles = 1_000_000 -} - -if javascript { - // JavaScript engines crash when exceeding a certain stack size: - // - // - Chrome 106 and NodeJS V16, V18, and V19 crash around 10_000+ - // - Firefox 106 crashes around 35_000+. - // - Safari 16 crashes around 40_000+. - const recursion_test_cycles = 40_000 -} - pub fn length_test() { string.length("ĆŸā†‘e̊") |> should.equal(3) @@ -66,12 +53,6 @@ pub fn reverse_test() { |> string.reverse |> string.reverse |> should.equal("šŸ‘¶šŸæ") - - "abc" - |> string.repeat(recursion_test_cycles) - |> string.reverse - |> string.starts_with("cba") - |> should.be_true } pub fn split_test() { @@ -258,11 +239,6 @@ pub fn slice_test() { "šŸ‘¶šŸæ" |> string.slice(at_index: 0, length: 3) |> should.equal("šŸ‘¶šŸæ") - - "aaa" - |> string.repeat(recursion_test_cycles) - |> string.slice(at_index: recursion_test_cycles / 2, length: 3) - |> should.equal("aaa") } pub fn crop_test() { diff --git a/test/gleam_stdlib_test_ffi.mjs b/test/gleam_stdlib_test_ffi.mjs index e948e0f..b39dfa3 100755 --- a/test/gleam_stdlib_test_ffi.mjs +++ b/test/gleam_stdlib_test_ffi.mjs @@ -1,6 +1,6 @@ import { opendir } from "fs/promises"; -const dir = "build/dev/javascript/gleam_stdlib/dist/gleam/"; +const dir = "build/dev/javascript/gleam_stdlib/gleam/"; export async function main() { console.log("Running tests..."); -- cgit v1.2.3