Exemplo n.º 1
0
// Added this test to ensure that its understood that
// only one specific format is supported at this time.
func TestUnmarshalInvalidDateTimeFormatTimeTest(t *testing.T) {
	val := timeTest{}
	err := json.Unmarshal([]byte("2014-09-29T14:44Z"), &val)
	testutil.Assert(t, err != nil, "expected an error")
}
Exemplo n.º 2
0
func TestUnmarshalInvalidDataFormatTimeTest(t *testing.T) {
	val := timeTest{}
	err := json.Unmarshal([]byte("something other than date time"), &val)
	testutil.Assert(t, err != nil, "expected an error")
}