Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestDurationMarshalJSON (0.25 sec)

  1. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/duration_test.go

    			t.Errorf("Failed to unmarshal input %q: %v", c.input, err)
    		}
    		if result.D != c.result {
    			t.Errorf("Failed to unmarshal input %q: expected %q, got %q", c.input, c.result, result)
    		}
    	}
    }
    
    func TestDurationMarshalJSON(t *testing.T) {
    	cases := []struct {
    		input  Duration
    		result string
    	}{
    		{Duration{5 * time.Second}, `{"d":"5s"}`},
    		{Duration{2 * time.Minute}, `{"d":"2m0s"}`},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 07 18:17:32 UTC 2018
    - 4.1K bytes
    - Viewed (0)
Back to top