Home
last modified time | relevance | path

Searched refs:durpb (Results 1 – 3 of 3) sorted by relevance

/external/golang-protobuf/ptypes/
Dduration_test.go40 durpb "github.com/golang/protobuf/ptypes/duration" packageName
49 proto *durpb.Duration
55 {&durpb.Duration{Seconds: 0, Nanos: 0}, true, true, 0},
57 {&durpb.Duration{Seconds: 100, Nanos: 0}, true, true, 100 * time.Second},
58 {&durpb.Duration{Seconds: -100, Nanos: 0}, true, true, -100 * time.Second},
59 {&durpb.Duration{Seconds: 100, Nanos: 987}, true, true, 100*time.Second + 987},
60 {&durpb.Duration{Seconds: -100, Nanos: -987}, true, true, -(100*time.Second + 987)},
62 …{&durpb.Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, tru…
64 …{&durpb.Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, tru…
66 {&durpb.Duration{Seconds: -100, Nanos: 987}, false, false, 0},
[all …]
Dduration.go42 durpb "github.com/golang/protobuf/ptypes/duration" packageName
56 func validateDuration(d *durpb.Duration) error {
76 func Duration(p *durpb.Duration) (time.Duration, error) {
94 func DurationProto(d time.Duration) *durpb.Duration {
98 return &durpb.Duration{
/external/golang-protobuf/jsonpb/
Djsonpb_test.go49 durpb "github.com/golang/protobuf/ptypes/duration" packageName
476 {"Duration empty", marshaler, &durpb.Duration{}, `"0s"`},
477 {"Duration with secs", marshaler, &durpb.Duration{Seconds: 3}, `"3s"`},
478 {"Duration with -secs", marshaler, &durpb.Duration{Seconds: -3}, `"-3s"`},
479 {"Duration with nanos", marshaler, &durpb.Duration{Nanos: 1e6}, `"0.001s"`},
480 {"Duration with -nanos", marshaler, &durpb.Duration{Nanos: -1e6}, `"-0.001s"`},
481 …{"Duration with large secs", marshaler, &durpb.Duration{Seconds: 1e10, Nanos: 1}, `"10000000000.00…
482 {"Duration with 6-digit nanos", marshaler, &durpb.Duration{Nanos: 1e4}, `"0.000010s"`},
483 {"Duration with 3-digit nanos", marshaler, &durpb.Duration{Nanos: 1e6}, `"0.001s"`},
484 …{"Duration with -secs -nanos", marshaler, &durpb.Duration{Seconds: -123, Nanos: -450}, `"-123.0000…
[all …]