Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: b37b2f38e6
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (23 sloc) 0.378 kb
package pq
import (
"testing"
"time"
)
func TestScanTimestamp(t *testing.T) {
var nt NullTime
tn := time.Now()
(&nt).Scan(tn)
if !nt.Valid {
t.Errorf("Expected Valid=false")
}
if nt.Time != tn {
t.Errorf("Time value mismatch")
}
}
func TestScanNilTimestamp(t *testing.T) {
var nt NullTime
(&nt).Scan(nil)
if nt.Valid {
t.Errorf("Expected Valid=false")
}
}
Jump to Line
Something went wrong with that request. Please try again.