MCPcopy
hub / github.com/rclone/rclone / TestTimeString

Function TestTimeString

backend/b2/b2_internal_test.go:144–159  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

142}
143
144func TestTimeString(t *testing.T) {
145 for _, test := range []struct {
146 in time.Time
147 want string
148 }{
149 {fstest.Time("1970-01-01T00:00:00.000000000Z"), "0"},
150 {fstest.Time("2001-02-03T04:05:10.123123123Z"), "981173110123"},
151 {fstest.Time("2001-02-03T05:05:10.123123123+01:00"), "981173110123"},
152 } {
153 got := timeString(test.in)
154 if test.want != got {
155 t.Logf("%v: want %v got %v", test.in, test.want, got)
156 }
157 }
158
159}
160
161func TestParseTimeString(t *testing.T) {
162 for _, test := range []struct {

Callers

nothing calls this directly

Calls 3

TimeFunction · 0.92
timeStringFunction · 0.85
LogfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…