aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorinoas <mail@inoas.com>2024-05-26 13:48:33 +0200
committerLouis Pilfold <louis@lpil.uk>2024-06-02 14:05:26 +0100
commit5ccf68f1d0861ade7e0dc4eb2260d88c7c188dbe (patch)
tree1e27d2158fd27e50576308f85be7e373b5c2d12a /test
parentaa3bf69edbd3b9f6bbd7d62c4870f4d2db7c02cf (diff)
downloadgleam_stdlib-5ccf68f1d0861ade7e0dc4eb2260d88c7c188dbe.tar.gz
gleam_stdlib-5ccf68f1d0861ade7e0dc4eb2260d88c7c188dbe.zip
fix tests, improve changelog
Diffstat (limited to 'test')
-rw-r--r--test/gleam/dict_test.gleam8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/gleam/dict_test.gleam b/test/gleam/dict_test.gleam
index 9ec1475..5937e14 100644
--- a/test/gleam/dict_test.gleam
+++ b/test/gleam/dict_test.gleam
@@ -176,7 +176,7 @@ pub fn delete_test() {
|> should.equal(dict.from_list([#("b", 1), #("c", 2)]))
}
-pub fn update_test() {
+pub fn upsert_test() {
let dict = dict.from_list([#("a", 0), #("b", 1), #("c", 2)])
let inc_or_zero = fn(x) {
@@ -187,15 +187,15 @@ pub fn update_test() {
}
dict
- |> dict.update("a", inc_or_zero)
+ |> dict.upsert("a", inc_or_zero)
|> should.equal(dict.from_list([#("a", 1), #("b", 1), #("c", 2)]))
dict
- |> dict.update("b", inc_or_zero)
+ |> dict.upsert("b", inc_or_zero)
|> should.equal(dict.from_list([#("a", 0), #("b", 2), #("c", 2)]))
dict
- |> dict.update("z", inc_or_zero)
+ |> dict.upsert("z", inc_or_zero)
|> should.equal(dict.from_list([#("a", 0), #("b", 1), #("c", 2), #("z", 0)]))
}