Skip to content

Commit

Permalink
Added checking logic for unused err
Browse files Browse the repository at this point in the history
  • Loading branch information
fourjae committed Sep 19, 2023
1 parent 25e79b1 commit 5b78e7d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/document/crdt/array_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions pkg/document/crdt/rga_tree_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/document/crdt/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 5b78e7d

Please sign in to comment.