From 5b78e7d231b72e6463a2f8a9e9a706bea3cf7554 Mon Sep 17 00:00:00 2001 From: yeongha Date: Wed, 20 Sep 2023 00:40:25 +0900 Subject: [PATCH] Added checking logic for unused err --- pkg/document/crdt/array_test.go | 1 + pkg/document/crdt/rga_tree_list_test.go | 1 + pkg/document/crdt/root_test.go | 2 ++ 3 files changed, 4 insertions(+) diff --git a/pkg/document/crdt/array_test.go b/pkg/document/crdt/array_test.go index fad573ea1..5b40ca916 100644 --- a/pkg/document/crdt/array_test.go +++ b/pkg/document/crdt/array_test.go @@ -31,6 +31,7 @@ func TestArray(t *testing.T) { ctx := helper.TextChangeContext(root) treeList, err := crdt.NewRGATreeList() + assert.NoError(t, err) a, err := crdt.NewArray(treeList, ctx.IssueTimeTicket()) assert.NoError(t, err) diff --git a/pkg/document/crdt/rga_tree_list_test.go b/pkg/document/crdt/rga_tree_list_test.go index d942660b9..62aa93e2f 100644 --- a/pkg/document/crdt/rga_tree_list_test.go +++ b/pkg/document/crdt/rga_tree_list_test.go @@ -18,6 +18,7 @@ func TestRGATreeList(t *testing.T) { for _, v := range []string{"1", "2", "3"} { primitive, err := crdt.NewPrimitive(v, ctx.IssueTimeTicket()) + assert.NoError(t, err) err = elements.Add(primitive) assert.NoError(t, err) } diff --git a/pkg/document/crdt/root_test.go b/pkg/document/crdt/root_test.go index 953772dd0..833e63484 100644 --- a/pkg/document/crdt/root_test.go +++ b/pkg/document/crdt/root_test.go @@ -43,6 +43,7 @@ func TestRoot(t *testing.T) { for _, v := range []int{0, 1, 2} { primitive, err := crdt.NewPrimitive(v, ctx.IssueTimeTicket()) + assert.NoError(t, err) err = array.Add(primitive) assert.NoError(t, err) } @@ -198,6 +199,7 @@ func TestRoot(t *testing.T) { assert.NoError(t, err) for _, v := range []int{1, 2, 3} { primitive, err := crdt.NewPrimitive(v, ctx.IssueTimeTicket()) + assert.NoError(t, err) err = arr.Add(primitive) assert.NoError(t, err) }