Skip to content

Commit

Permalink
types: migrate TestGetTimezone to testify (pingcap#28010)
Browse files Browse the repository at this point in the history
Signed-off-by: Karuppiah Natarajan <karuppiah7890@users.noreply.github.com>
  • Loading branch information
karuppiah7890 committed Sep 16, 2021
1 parent 3780f40 commit aa904a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions types/time_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,8 @@ func TestFromGoTime(t *testing.T) {

}

func (s *testTimeSuite) TestGetTimezone(c *C) {
func TestGetTimezone(t *testing.T) {
t.Parallel()
cases := []struct {
input string
idx int
Expand All @@ -1983,7 +1984,7 @@ func (s *testTimeSuite) TestGetTimezone(c *C) {
}
for ith, ca := range cases {
idx, tzSign, tzHour, tzSep, tzMinute := types.GetTimezone(ca.input)
c.Assert([5]interface{}{idx, tzSign, tzHour, tzSep, tzMinute}, Equals, [5]interface{}{ca.idx, ca.tzSign, ca.tzHour, ca.tzSep, ca.tzMinute}, Commentf("idx %d", ith))
require.Equal(t, [5]interface{}{ca.idx, ca.tzSign, ca.tzHour, ca.tzSep, ca.tzMinute}, [5]interface{}{idx, tzSign, tzHour, tzSep, tzMinute}, "idx %d", ith)
}
}

Expand Down

0 comments on commit aa904a9

Please sign in to comment.