tests bug fixed

This commit is contained in:
Lunny Xiao 2013-12-26 16:37:56 +08:00
parent 17d74617ea
commit 3f2328d918
1 changed files with 2 additions and 1 deletions

View File

@ -3525,7 +3525,8 @@ func testNullValue(engine *Engine, t *testing.T) {
// skipped postgres test due to postgres driver doesn't read time.Time's timzezone info when stored in the db // skipped postgres test due to postgres driver doesn't read time.Time's timzezone info when stored in the db
// mysql and sqlite3 seem have done this correctly by storing datatime in UTC timezone, I think postgres driver // mysql and sqlite3 seem have done this correctly by storing datatime in UTC timezone, I think postgres driver
// prefer using timestamp with timezone to sovle the issue // prefer using timestamp with timezone to sovle the issue
if engine.DriverName != POSTGRES && engine.DriverName != MYMYSQL { if engine.DriverName != POSTGRES && engine.DriverName != MYMYSQL &&
engine.DriverName != MYSQL {
if (*nullDataGet.TimePtr).Unix() != (*nullDataUpdate.TimePtr).Unix() { if (*nullDataGet.TimePtr).Unix() != (*nullDataUpdate.TimePtr).Unix() {
t.Error(errors.New(fmt.Sprintf("inserted value unmatch: [%v]:[%v]", *nullDataGet.TimePtr, *nullDataUpdate.TimePtr))) t.Error(errors.New(fmt.Sprintf("inserted value unmatch: [%v]:[%v]", *nullDataGet.TimePtr, *nullDataUpdate.TimePtr)))
} else { } else {