aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2024-12-17 15:20:35 +0000
committerLouis Pilfold <louis@lpil.uk>2024-12-17 15:20:35 +0000
commitc33b7341838d9286903c39697c82fc81f30fd437 (patch)
treeeaee379b5112b8e60fd7c5d3b9daa76d8f3581a7
parentbb50cd1621fe10aad79fa40d6437265084344ad4 (diff)
downloadgleam_stdlib-c33b7341838d9286903c39697c82fc81f30fd437.tar.gz
gleam_stdlib-c33b7341838d9286903c39697c82fc81f30fd437.zip
v0.48.0v0.48.0
-rw-r--r--CHANGELOG.md5
-rw-r--r--gleam.toml2
-rw-r--r--properties/main_test.ts76
3 files changed, 5 insertions, 78 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc7fd8a..0c3cb31 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,12 @@
# Changelog
-## v0.47.0 - 2024-12-17
+## v0.48.0 - 2024-12-17
- Fixed a bug where `string.utf_codepoint` would erronously accept negative input.
- The deprecated `string_builder` and `bytes_builder` modules have been removed.
+
+## v0.47.0 - 2024-12-10
+
- The `compare` and `to_int` functions from the `gleam/bool` module have been
deprecated.
diff --git a/gleam.toml b/gleam.toml
index 3ce6d59..0ca774c 100644
--- a/gleam.toml
+++ b/gleam.toml
@@ -1,5 +1,5 @@
name = "gleam_stdlib"
-version = "0.47.0"
+version = "0.48.0"
gleam = ">= 0.32.0"
licences = ["Apache-2.0"]
description = "A standard library for the Gleam programming language"
diff --git a/properties/main_test.ts b/properties/main_test.ts
deleted file mode 100644
index 669e1d9..0000000
--- a/properties/main_test.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import fc from "https://cdn.skypack.dev/fast-check";
-import PMap from "../build/dev/javascript/gleam_stdlib/persistent-hash-map.mjs";
-
-const options = Object.freeze({
- numRuns: 1000_000,
-});
-
-Deno.test("all inserted numbers must exist within", () => {
- const property = (numbers: Array<number>) => {
- let map = PMap.new();
-
- // Insert all numbers
- for (const number of numbers) {
- map = map.set(number, 1);
- }
-
- // Check that all numbers are in the map
- for (const number of numbers) {
- if (!map.has(number)) {
- console.log(`Number ${number} not found`);
- return false;
- }
- }
- };
-
- const arbitrary = fc.array(fc.integer());
- fc.assert(fc.property(arbitrary, property), options);
-});
-
-Deno.test("all inserted values can be got", () => {
- const property = (numbers: Array<[number, number]>) => {
- const reference = new Map();
- let map = PMap.new();
-
- // Insert all pairs
- for (const [k, v] of numbers) {
- reference.set(k, v);
- map = map.set(k, v);
- }
-
- // Check that all keys have the correct value
- for (const [k, _] of numbers) {
- const expected = reference.get(k);
- const found = map.get(k, undefined);
- if (found !== expected) {
- console.log(`${k} was ${found} not ${expected}`);
- return false;
- }
- }
- };
-
- const arbitrary = fc.array(fc.tuple(fc.integer(), fc.integer()));
- fc.assert(fc.property(arbitrary, property), options);
-});
-
-Deno.test("size", () => {
- const property = (numbers: Array<number>) => {
- const reference = new Map();
- let map = PMap.new();
-
- // Insert all values
- for (const k of numbers) {
- reference.set(k, 1);
- map = map.set(k, 1);
- }
-
- // Map size should match reference
- if (map.size !== reference.size) {
- console.log(`size was ${map.size} not ${reference.size}`);
- return false;
- }
- };
-
- const arbitrary = fc.array(fc.integer());
- fc.assert(fc.property(arbitrary, property), options);
-});