aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2019-10-20 18:02:39 +0100
committerLouis Pilfold <louis@lpil.uk>2019-10-20 18:02:39 +0100
commitedaa30bda6520be7940e8c8fb8d0ec95947201e0 (patch)
tree482157a6b73536e9939dec81332db544f030d0e6 /test
parent81b3ca2b9b3dceedd62fbcef741548ae8a513601 (diff)
downloadgleam_stdlib-edaa30bda6520be7940e8c8fb8d0ec95947201e0.tar.gz
gleam_stdlib-edaa30bda6520be7940e8c8fb8d0ec95947201e0.zip
Rename map functions
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),