コード例 #1
0
ファイル: iso8601DateTime_test.go プロジェクト: heartsg/dasea
// 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")
}
コード例 #2
0
ファイル: iso8601DateTime_test.go プロジェクト: heartsg/dasea
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")
}