Skip to content

Commit

Permalink
修改DeleteElement测试
Browse files Browse the repository at this point in the history
  • Loading branch information
Oasis committed Oct 24, 2023
1 parent a08471f commit f101874
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/list/skip_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ package list
import (
"errors"
"fmt"
"testing"

"github.com/ecodeclub/ekit"
"github.com/ecodeclub/ekit/internal/errs"
"github.com/stretchr/testify/assert"
"testing"
)

func TestNewSkipList(t *testing.T) {
Expand Down Expand Up @@ -110,7 +111,7 @@ func TestSkipList_DeleteElement(t *testing.T) {
value: 2,
wantSlice: []int{1, 3},
wantSize: 2,
wantRes: false,
wantRes: true,
},
{
name: "delete 1 from [1,3]",
Expand All @@ -128,7 +129,7 @@ func TestSkipList_DeleteElement(t *testing.T) {
value: 1,
wantSlice: []int{},
wantSize: 0,
wantRes: false,
wantRes: true,
},
{
name: "delete 1 from [1]",
Expand All @@ -146,7 +147,7 @@ func TestSkipList_DeleteElement(t *testing.T) {
value: 1,
wantSlice: []int{2},
wantSize: 1,
wantRes: false,
wantRes: true,
},
{
name: "delete 3 from [1,2,3,4,5,6,7]",
Expand All @@ -164,7 +165,7 @@ func TestSkipList_DeleteElement(t *testing.T) {
value: 8,
wantSlice: []int{1, 2, 3, 4, 5, 6, 7},
wantSize: 7,
wantRes: false,
wantRes: true,
},
}

Expand Down

0 comments on commit f101874

Please sign in to comment.