Browse Source

simple compare statement

Diego Alvarez 4 năm trước cách đây
mục cha
commit
f6fb4afcdd
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      balance_strategy_test.go

+ 1 - 1
balance_strategy_test.go

@@ -2008,7 +2008,7 @@ func Test_stickyBalanceStrategy_Plan_AssignmentData(t *testing.T) {
 	if err != nil {
 	if err != nil {
 		t.Errorf("Error building assignment data: %v", err)
 		t.Errorf("Error building assignment data: %v", err)
 	}
 	}
-	if bytes.Compare(expected, actual) != 0 {
+	if !bytes.Equal(expected, actual) {
 		t.Error("Invalid assignment data returned from AssignmentData")
 		t.Error("Invalid assignment data returned from AssignmentData")
 	}
 	}
 }
 }