fix list_test.go func[TestPush] an unexpected line code made the test went wrong

merged into single commit
This commit is contained in:
Allen
2023-03-16 12:16:58 +08:00
committed by finley
parent 48a146cb08
commit 3e6d2090c5

View File

@@ -80,7 +80,7 @@ func TestPush(t *testing.T) {
args[i+1] = value args[i+1] = value
expectedValues[size-i-1] = []byte(value) expectedValues[size-i-1] = []byte(value)
} }
result = execLPush(testDB, values) // result = execLPush(testDB, values)
result = testDB.Exec(nil, utils.ToCmdLine2("lpush", args...)) result = testDB.Exec(nil, utils.ToCmdLine2("lpush", args...))
if intResult, _ := result.(*protocol.IntReply); intResult.Code != int64(size) { if intResult, _ := result.(*protocol.IntReply); intResult.Code != int64(size) {
t.Error(fmt.Sprintf("expected %d, actually %d", size, intResult.Code)) t.Error(fmt.Sprintf("expected %d, actually %d", size, intResult.Code))