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:11 +0000 |
commit | a77f74d2b154b50688807e20c326c78a67f6d68a (patch) | |
tree | f65ef7dc6a03204c9623e803e880164c34cfcf88 | |
parent | 1cd95fb58fcddb3bc27e8f8dfeca8d898fbc1806 (diff) | |
download | gleam_stdlib-a77f74d2b154b50688807e20c326c78a67f6d68a.tar.gz gleam_stdlib-a77f74d2b154b50688807e20c326c78a67f6d68a.zip |
v0.25.0v0.25.0
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | gleam.toml | 2 | ||||
-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 |
5 files changed, 3 insertions, 35 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index dd0029f..087a1fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## v0.24.1 - unreleased +## v0.25.0 - 2022-11-19 - Fixed a bug where `list.permutations` would not correctly permutate lists with non-unique item values. @@ -1,5 +1,5 @@ name = "gleam_stdlib" -version = "0.24.0" +version = "0.25.0" licences = ["Apache-2.0"] description = "A standard library for the Gleam programming language" 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 13069f1..1ec5d10 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() { @@ -252,11 +233,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..."); |