aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOleksandr Redko <[email protected]>2024-12-05 12:25:13 +0200
committerBjørn Erik Pedersen <[email protected]>2024-12-05 12:40:59 +0100
commitd0dc518844f76045787b5c8bd90498cb0e133ae6 (patch)
tree30bb89926a8bfc5b1702bcb1e10444ff8c34319b
parentb529859008fae916a0509645da539072e62dfcb1 (diff)
downloadhugo-d0dc518844f76045787b5c8bd90498cb0e133ae6.tar.gz
hugo-d0dc518844f76045787b5c8bd90498cb0e133ae6.zip
common/maps: Simplify TestScratchSetInMap/DeleteInMap
-rw-r--r--common/maps/scratch_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/maps/scratch_test.go b/common/maps/scratch_test.go
index b515adb1d..88fd73f2b 100644
--- a/common/maps/scratch_test.go
+++ b/common/maps/scratch_test.go
@@ -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) {
@@ -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) {