Skip to content

Commit a921722

Browse files
authored
Merge pull request #882 from jordanlewis/fix-inf-test
bugfix to infinity timestamp test
2 parents d14e375 + 464bb40 commit a921722

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

encode_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ func TestInfinityTimestamp(t *testing.T) {
322322
// try to assert []byte to time.Time
323323
for _, q := range tc {
324324
err = db.QueryRow(q.Query, q.Param).Scan(&resultT)
325-
if !q.ExpectedErrorStrRegexp.MatchString(err.Error()) {
325+
if err == nil || !q.ExpectedErrorStrRegexp.MatchString(err.Error()) {
326326
t.Errorf("Scanning -/+infinity, expected error to match regexp %q, got %q",
327327
q.ExpectedErrorStrRegexp, err)
328328
}

0 commit comments

Comments
 (0)