aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/gleam/any_test.gleam6
-rw-r--r--test/gleam/map_test.gleam16
2 files changed, 11 insertions, 11 deletions
diff --git a/test/gleam/any_test.gleam b/test/gleam/any_test.gleam
index af184d8..376d454 100644
--- a/test/gleam/any_test.gleam
+++ b/test/gleam/any_test.gleam
@@ -222,14 +222,14 @@ pub fn field_test() {
let Ok(error_atom) = atom.from_string("error")
map.new()
- |> map.put(_, ok_atom, 1)
+ |> map.insert(_, ok_atom, 1)
|> any.from
|> any.field(_, ok_atom)
|> expect.equal(_, Ok(any.from(1)))
map.new()
- |> map.put(_, ok_atom, 3)
- |> map.put(_, error_atom, 1)
+ |> map.insert(_, ok_atom, 3)
+ |> map.insert(_, error_atom, 1)
|> any.from
|> any.field(_, ok_atom)
|> expect.equal(_, Ok(any.from(3)))
diff --git a/test/gleam/map_test.gleam b/test/gleam/map_test.gleam
index 20e7999..3d117c3 100644
--- a/test/gleam/map_test.gleam
+++ b/test/gleam/map_test.gleam
@@ -53,7 +53,7 @@ pub fn new_test() {
|> expect.equal(_, [])
}
-pub fn fetch_test() {
+pub fn get_test() {
let proplist = [
pair.Pair(4, 0),
pair.Pair(1, 1),
@@ -61,23 +61,23 @@ pub fn fetch_test() {
let m = map.from_list(proplist)
m
- |> map.fetch(_, 4)
+ |> map.get(_, 4)
|> expect.equal(_, Ok(0))
m
- |> map.fetch(_, 1)
+ |> map.get(_, 1)
|> expect.equal(_, Ok(1))
m
- |> map.fetch(_, 2)
+ |> map.get(_, 2)
|> expect.equal(_, Error(Nil))
}
-pub fn put_test() {
+pub fn insert_test() {
map.new()
- |> map.put(_, "a", 0)
- |> map.put(_, "b", 1)
- |> map.put(_, "c", 2)
+ |> map.insert(_, "a", 0)
+ |> map.insert(_, "b", 1)
+ |> map.insert(_, "c", 2)
|> expect.equal(_, map.from_list([
pair.Pair("a", 0),
pair.Pair("b", 1),