Skip to content

Commit

Permalink
test: Adding test case for dict_clone()
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward committed Dec 11, 2024
1 parent 23cbb87 commit 9519ef0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/dict.tok
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ list(iter(d))
list(d.keys)
list(d.items)

# clone

d = (a => 1 b => 2)
e = d.clone()

e["c"] = 3
d
e

# merge

d = (a => 1 b => 2)
Expand Down Expand Up @@ -156,6 +165,9 @@ d
#("a", "b")
#(("a", 1), ("b", 2))

#(a => 1 b => 2)
#(a => 1 b => 2 c => 3)

#(a => 1 b => 2 c => 3)
#(a => 1 b => 2 c => 3)
#(a => 1 b => 2 c => 3)
Expand Down

0 comments on commit 9519ef0

Please sign in to comment.