Skip to content

Commit

Permalink
common/maps: Simplify TestScratchSetInMap/DeleteInMap
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored and bep committed Dec 5, 2024
1 parent b529859 commit d0dc518
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/maps/scratch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func TestScratchSetInMap(t *testing.T) {
scratch.SetInMap("key", "zyx", "Zyx")
scratch.SetInMap("key", "abc", "Abc (updated)")
scratch.SetInMap("key", "def", "Def")
c.Assert(scratch.GetSortedMapValues("key"), qt.DeepEquals, []any{0: "Abc (updated)", 1: "Def", 2: "Lux", 3: "Zyx"})
c.Assert(scratch.GetSortedMapValues("key"), qt.DeepEquals, any([]any{"Abc (updated)", "Def", "Lux", "Zyx"}))
}

func TestScratchDeleteInMap(t *testing.T) {
Expand All @@ -199,7 +199,7 @@ func TestScratchDeleteInMap(t *testing.T) {
scratch.DeleteInMap("key", "abc")
scratch.SetInMap("key", "def", "Def")
scratch.DeleteInMap("key", "lmn") // Do nothing
c.Assert(scratch.GetSortedMapValues("key"), qt.DeepEquals, []any{0: "Def", 1: "Lux", 2: "Zyx"})
c.Assert(scratch.GetSortedMapValues("key"), qt.DeepEquals, any([]any{"Def", "Lux", "Zyx"}))
}

func TestScratchGetSortedMapValues(t *testing.T) {
Expand Down

0 comments on commit d0dc518

Please sign in to comment.