예제 #1
0
파일: box_test.go 프로젝트: jackc/box
func (s *MySuite) TestSetCoerceNil(c *C) {
	var b box.Time

	b.SetCoerceNil(nil, box.Empty)

	c.Check(b.Status(), Equals, byte(box.Empty))
}
예제 #2
0
파일: box_test.go 프로젝트: jackc/box
func (s *MySuite) TestSetCoerceZero(c *C) {
	var b box.Time
	var zero time.Time

	b.SetCoerceZero(zero, box.Empty)
	c.Check(b.Status(), Equals, byte(box.Empty))
}
예제 #3
0
파일: box_test.go 프로젝트: jackc/box
func (s *MySuite) TestZeroValueTimeIsUndefined(c *C) {
	var b box.Time
	c.Check(b.Status(), Equals, byte(box.Undefined))
}