From 50390d4eb77c63a1609a75827c97d55984aa966e Mon Sep 17 00:00:00 2001 From: Shane Kerr Date: Wed, 25 Oct 2023 21:18:36 +0200 Subject: [PATCH] Add names to fields used in tests --- lmdbscan/scanner_test.go | 72 ++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/lmdbscan/scanner_test.go b/lmdbscan/scanner_test.go index 9d90a6a3..3590b81b 100644 --- a/lmdbscan/scanner_test.go +++ b/lmdbscan/scanner_test.go @@ -85,12 +85,12 @@ func TestScanner_Scan(t *testing.T) { } items := lmdbtest.SimpleItemList{ - {"k0", "v0"}, - {"k1", "v1"}, - {"k2", "v2"}, - {"k3", "v3"}, - {"k4", "v4"}, - {"k5", "v5"}, + {K: "k0", V: "v0"}, + {K: "k1", V: "v1"}, + {K: "k2", V: "v2"}, + {K: "k3", V: "v3"}, + {K: "k4", V: "v4"}, + {K: "k5", V: "v5"}, } err = lmdbtest.Put(env, dbi, items) if err != nil { @@ -119,12 +119,12 @@ func TestScanner_Set(t *testing.T) { } items := lmdbtest.SimpleItemList{ - {"k0", "v0"}, - {"k1", "v1"}, - {"k2", "v2"}, - {"k3", "v3"}, - {"k4", "v4"}, - {"k5", "v5"}, + {K: "k0", V: "v0"}, + {K: "k1", V: "v1"}, + {K: "k2", V: "v2"}, + {K: "k3", V: "v3"}, + {K: "k4", V: "v4"}, + {K: "k5", V: "v5"}, } err = lmdbtest.Put(env, dbi, items) if err != nil { @@ -166,12 +166,12 @@ func TestScanner_SetNext(t *testing.T) { } items := lmdbtest.SimpleItemList{ - {"k0", "v0"}, - {"k1", "v1"}, - {"k2", "v2"}, - {"k3", "v3"}, - {"k4", "v4"}, - {"k5", "v5"}, + {K: "k0", V: "v0"}, + {K: "k1", V: "v1"}, + {K: "k2", V: "v2"}, + {K: "k3", V: "v3"}, + {K: "k4", V: "v4"}, + {K: "k5", V: "v5"}, } err = lmdbtest.Put(env, dbi, items) if err != nil { @@ -220,12 +220,12 @@ func TestScanner_Del(t *testing.T) { } items := lmdbtest.SimpleItemList{ - {"k0", "v0"}, - {"k1", "v1"}, - {"k2", "v2"}, - {"k3", "v3"}, - {"k4", "v4"}, - {"k5", "v5"}, + {K: "k0", V: "v0"}, + {K: "k1", V: "v1"}, + {K: "k2", V: "v2"}, + {K: "k3", V: "v3"}, + {K: "k4", V: "v4"}, + {K: "k5", V: "v5"}, } err = lmdbtest.Put(env, dbi, items) if err != nil { @@ -277,12 +277,12 @@ func TestScanner_Del_closed(t *testing.T) { } items := lmdbtest.SimpleItemList{ - {"k0", "v0"}, - {"k1", "v1"}, - {"k2", "v2"}, - {"k3", "v3"}, - {"k4", "v4"}, - {"k5", "v5"}, + {K: "k0", V: "v0"}, + {K: "k1", V: "v1"}, + {K: "k2", V: "v2"}, + {K: "k3", V: "v3"}, + {K: "k4", V: "v4"}, + {K: "k5", V: "v5"}, } err = lmdbtest.Put(env, dbi, items) if err != nil { @@ -313,12 +313,12 @@ func TestScanner_Cursor_Del(t *testing.T) { } items := lmdbtest.SimpleItemList{ - {"k0", "v0"}, - {"k1", "v1"}, - {"k2", "v2"}, - {"k3", "v3"}, - {"k4", "v4"}, - {"k5", "v5"}, + {K: "k0", V: "v0"}, + {K: "k1", V: "v1"}, + {K: "k2", V: "v2"}, + {K: "k3", V: "v3"}, + {K: "k4", V: "v4"}, + {K: "k5", V: "v5"}, } err = lmdbtest.Put(env, dbi, items) if err != nil {