From a77f74d2b154b50688807e20c326c78a67f6d68a Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Sat, 19 Nov 2022 14:02:11 +0000 Subject: v0.25.0 --- CHANGELOG.md | 2 +- gleam.toml | 2 +- test/gleam/list_test.gleam | 8 -------- test/gleam/string_test.gleam | 24 ------------------------ 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. diff --git a/gleam.toml b/gleam.toml index 81d661f..4963f2a 100644 --- a/gleam.toml +++ b/gleam.toml @@ -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..."); -- cgit v1.2.3