diff options
author | Louis Pilfold <louis@lpil.uk> | 2022-11-19 14:02:11 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2022-11-19 14:02:23 +0000 |
commit | 580fd9d7bde8a0bf79139765634a63c515f5a458 (patch) | |
tree | 388d1faed03b5dcd6b72fd29b618642caf4add13 /test | |
parent | 115afa61406cdc77e68133bc5a02f937911b4349 (diff) | |
download | gleam_stdlib-580fd9d7bde8a0bf79139765634a63c515f5a458.tar.gz gleam_stdlib-580fd9d7bde8a0bf79139765634a63c515f5a458.zip |
v0.25.0
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/list_test.gleam | 8 | ||||
-rw-r--r-- | test/gleam/string_test.gleam | 24 | ||||
-rwxr-xr-x | test/gleam_stdlib_test_ffi.mjs | 2 |
3 files changed, 1 insertions, 33 deletions
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..."); |