You've already forked json-iterator
							
							
				mirror of
				https://github.com/json-iterator/go.git
				synced 2025-10-31 00:07:40 +02:00 
			
		
		
		
	fix tests
This commit is contained in:
		| @@ -212,10 +212,10 @@ func Test_unmarshaler_and_decoder(t *testing.T) { | |||||||
| 	obj := TestObject{} | 	obj := TestObject{} | ||||||
| 	val := ObjectImplementedUnmarshaler(0) | 	val := ObjectImplementedUnmarshaler(0) | ||||||
| 	obj.Field = &val | 	obj.Field = &val | ||||||
| 	err := json.Unmarshal([]byte(`{"Field":"hello"}`), &obj) | 	err := json.Unmarshal([]byte(`{"Field":"100"}`), &obj) | ||||||
| 	should.Nil(err) | 	should.Nil(err) | ||||||
| 	should.Equal(100, int(*obj.Field)) | 	should.Equal(100, int(*obj.Field)) | ||||||
| 	err = Unmarshal([]byte(`{"Field":"hello"}`), &obj) | 	err = Unmarshal([]byte(`{"Field":"100"}`), &obj) | ||||||
| 	should.Nil(err) | 	should.Nil(err) | ||||||
| 	should.Equal(10, int(*obj.Field)) | 	should.Equal(10, int(*obj.Field)) | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user