Fix TestIntervalNormalize
This commit is contained in:
@@ -33,31 +33,31 @@ func TestIntervalNormalize(t *testing.T) {
|
|||||||
testutil.TestSuccessfulNormalize(t, []testutil.NormalizeTest{
|
testutil.TestSuccessfulNormalize(t, []testutil.NormalizeTest{
|
||||||
{
|
{
|
||||||
SQL: "select '1 second'::interval",
|
SQL: "select '1 second'::interval",
|
||||||
Value: pgtype.Interval{Microseconds: 1000000, Status: pgtype.Present},
|
Value: &pgtype.Interval{Microseconds: 1000000, Status: pgtype.Present},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
SQL: "select '1.000001 second'::interval",
|
SQL: "select '1.000001 second'::interval",
|
||||||
Value: pgtype.Interval{Microseconds: 1000001, Status: pgtype.Present},
|
Value: &pgtype.Interval{Microseconds: 1000001, Status: pgtype.Present},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
SQL: "select '34223 hours'::interval",
|
SQL: "select '34223 hours'::interval",
|
||||||
Value: pgtype.Interval{Microseconds: 123202800000000, Status: pgtype.Present},
|
Value: &pgtype.Interval{Microseconds: 123202800000000, Status: pgtype.Present},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
SQL: "select '1 day'::interval",
|
SQL: "select '1 day'::interval",
|
||||||
Value: pgtype.Interval{Days: 1, Status: pgtype.Present},
|
Value: &pgtype.Interval{Days: 1, Status: pgtype.Present},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
SQL: "select '1 month'::interval",
|
SQL: "select '1 month'::interval",
|
||||||
Value: pgtype.Interval{Months: 1, Status: pgtype.Present},
|
Value: &pgtype.Interval{Months: 1, Status: pgtype.Present},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
SQL: "select '1 year'::interval",
|
SQL: "select '1 year'::interval",
|
||||||
Value: pgtype.Interval{Months: 12, Status: pgtype.Present},
|
Value: &pgtype.Interval{Months: 12, Status: pgtype.Present},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
SQL: "select '-13 mon'::interval",
|
SQL: "select '-13 mon'::interval",
|
||||||
Value: pgtype.Interval{Months: -13, Status: pgtype.Present},
|
Value: &pgtype.Interval{Months: -13, Status: pgtype.Present},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user