Explorar o código

Using %q instead of "%s" to make the extra byte visible, as suggested in https://github.com/go-sql-driver/mysql/pull/140#issuecomment-27236022

Carlos Nieto %!s(int64=12) %!d(string=hai) anos
pai
achega
307802bcbc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      driver_test.go

+ 1 - 1
driver_test.go

@@ -542,7 +542,7 @@ func TestTime(t *testing.T) {
 				var oTime string
 				rows.Scan(&oTime)
 				if oTime != sTime.value {
-					dbt.Error(fmt.Sprintf(`time values differ: got "%s", expecting "%s".`, oTime, sTime.value))
+					dbt.Error(fmt.Sprintf(`time values differ: got %q, expected %q.`, oTime, sTime.value))
 				}
 			} else {
 				dbt.Error("expecting at least one row.")