8 func TestString(t *testing.T) {
9 d := Duration(123123123123 * time.Nanosecond)
10 if s, expect := d.String(), "123.123123"; s != expect {
11 t.Errorf("got %s, expect %s", s, expect)
15 func TestSet(t *testing.T) {
17 if err := d.Set("123.456"); err != nil {
20 if got, expect := time.Duration(d).Nanoseconds(), int64(123456000000); got != expect {
21 t.Errorf("got %d, expect %d", got, expect)