Home
last modified time | relevance | path

Searched refs:readValue (Results 1 – 25 of 438) sorted by relevance

12345678910>>...18

/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/struct/
DUnwrapSingleArrayScalarsTest.java50 BooleanBean result = r.readValue(new StringReader("{\"v\":[true]}")); in testBooleanPrimitiveArrayUnwrap()
55 result = r.readValue("{\"v\":[null]}"); in testBooleanPrimitiveArrayUnwrap()
59 result = r.readValue("[{\"v\":[null]}]"); in testBooleanPrimitiveArrayUnwrap()
64 .readValue(new StringReader("[ [ null ] ]")); in testBooleanPrimitiveArrayUnwrap()
80 .readValue("{\"v\":[3]}"); in testIntPrimitiveArrayUnwrap()
87 IntBean result = r.readValue("{\"v\":[3]}"); in testIntPrimitiveArrayUnwrap()
90 result = r.readValue("[{\"v\":[3]}]"); in testIntPrimitiveArrayUnwrap()
94 r.readValue("[{\"v\":[3,3]}]"); in testIntPrimitiveArrayUnwrap()
100 result = r.readValue("{\"v\":[null]}"); in testIntPrimitiveArrayUnwrap()
104 int[] array = UNWRAPPING_READER.forType(int[].class).readValue("[ [ null ] ]"); in testIntPrimitiveArrayUnwrap()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/convert/
DCoerceFloatToIntTest.java50 Integer I = DEFAULT_MAPPER.readValue(" 1.25 ", Integer.class); in testLegacyDoubleToIntCoercion()
53 IntWrapper w = DEFAULT_MAPPER.readValue("{\"i\":-2.25 }", IntWrapper.class); in testLegacyDoubleToIntCoercion()
55 int[] arr = DEFAULT_MAPPER.readValue("[ 1.25 ]", int[].class); in testLegacyDoubleToIntCoercion()
59 Long L = DEFAULT_MAPPER.readValue(" 3.33 ", Long.class); in testLegacyDoubleToIntCoercion()
62 LongWrapper w = DEFAULT_MAPPER.readValue("{\"l\":-2.25 }", LongWrapper.class); in testLegacyDoubleToIntCoercion()
64 long[] arr = DEFAULT_MAPPER.readValue("[ 1.25 ]", long[].class); in testLegacyDoubleToIntCoercion()
68 Short S = DEFAULT_MAPPER.readValue("42.33", Short.class); in testLegacyDoubleToIntCoercion()
71 BigInteger biggie = DEFAULT_MAPPER.readValue("95.3", BigInteger.class); in testLegacyDoubleToIntCoercion()
115 assertNull(MAPPER_TO_NULL.readValue("1.5", Integer.class)); in testCoerceConfigFloatToNull()
117 assertEquals(Integer.valueOf(0), MAPPER_TO_NULL.readValue("1.5", Integer.TYPE)); in testCoerceConfigFloatToNull()
[all …]
DCoerceToBooleanTest.java68 p = r.readValue(DOC_WITH_0); in testToBooleanCoercionSuccessPojo()
70 p = r.readValue(utf8Bytes(DOC_WITH_0)); in testToBooleanCoercionSuccessPojo()
73 p = r.readValue(DOC_WITH_1); in testToBooleanCoercionSuccessPojo()
75 p = r.readValue(utf8Bytes(DOC_WITH_1)); in testToBooleanCoercionSuccessPojo()
83 assertEquals(Boolean.FALSE, br.readValue(" 0")); in testToBooleanCoercionSuccessRoot()
84 assertEquals(Boolean.FALSE, br.readValue(utf8Bytes(" 0"))); in testToBooleanCoercionSuccessRoot()
85 assertEquals(Boolean.TRUE, br.readValue(" -1")); in testToBooleanCoercionSuccessRoot()
86 assertEquals(Boolean.TRUE, br.readValue(utf8Bytes(" -1"))); in testToBooleanCoercionSuccessRoot()
92 ab = atomicR.readValue(" 0"); in testToBooleanCoercionSuccessRoot()
93 ab = atomicR.readValue(utf8Bytes(" 0")); in testToBooleanCoercionSuccessRoot()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/jdk/
DJDKScalarsTest.java139 BooleanBean result = MAPPER.readValue("{\"v\":true}", BooleanBean.class); in testBooleanPrimitive()
141 result = MAPPER.readValue("{\"v\":null}", BooleanBean.class); in testBooleanPrimitive()
144 result = MAPPER.readValue("{\"v\":1}", BooleanBean.class); in testBooleanPrimitive()
149 boolean[] array = MAPPER.readValue("[ null, false ]", boolean[].class); in testBooleanPrimitive()
162 Boolean result = MAPPER.readValue("true", Boolean.class); in testBooleanWrapper()
164 result = MAPPER.readValue("false", Boolean.class); in testBooleanWrapper()
168 result = MAPPER.readValue("0", Boolean.class); in testBooleanWrapper()
170 result = MAPPER.readValue("1", Boolean.class); in testBooleanWrapper()
178 …BooleanWrapper b = MAPPER.readValue("{\"primitive\" : "+value+", \"wrapper\":"+value+", \"ctor\":"… in testLongToBoolean()
185 b = MAPPER.readValue("{\"primitive\" : 0 , \"wrapper\":0, \"ctor\":0}", in testLongToBoolean()
[all …]
DJDKNumberDeserTest.java105 Float result = MAPPER.readValue(" \"NaN\"", Float.class); in testNaN()
108 Double d = MAPPER.readValue(" \"NaN\"", Double.class); in testNaN()
111 Number num = MAPPER.readValue(" \"NaN\"", Number.class); in testNaN()
117 Double result = MAPPER.readValue(" \""+Double.POSITIVE_INFINITY+"\"", Double.class); in testDoubleInf()
120 result = MAPPER.readValue(" \""+Double.NEGATIVE_INFINITY+"\"", Double.class); in testDoubleInf()
128 assertNull(MAPPER.readValue(quote(""), Byte.class)); in testEmptyAsNumber()
129 assertNull(MAPPER.readValue(quote(""), Short.class)); in testEmptyAsNumber()
130 assertNull(MAPPER.readValue(quote(""), Character.class)); in testEmptyAsNumber()
131 assertNull(MAPPER.readValue(quote(""), Integer.class)); in testEmptyAsNumber()
132 assertNull(MAPPER.readValue(quote(""), Long.class)); in testEmptyAsNumber()
[all …]
DJDKStringLikeTypesTest.java74 ByteBuffer result = MAPPER.readValue(exp, ByteBuffer.class); in testByteBuffer()
86 assertSame(UTF8, MAPPER.readValue(quote("UTF-8"), Charset.class)); in testCharset()
92 assertSame(String.class, mapper.readValue(quote("java.lang.String"), Class.class)); in testClass()
95 assertSame(Boolean.TYPE, mapper.readValue(quote("boolean"), Class.class)); in testClass()
96 assertSame(Byte.TYPE, mapper.readValue(quote("byte"), Class.class)); in testClass()
97 assertSame(Short.TYPE, mapper.readValue(quote("short"), Class.class)); in testClass()
98 assertSame(Character.TYPE, mapper.readValue(quote("char"), Class.class)); in testClass()
99 assertSame(Integer.TYPE, mapper.readValue(quote("int"), Class.class)); in testClass()
100 assertSame(Long.TYPE, mapper.readValue(quote("long"), Class.class)); in testClass()
101 assertSame(Float.TYPE, mapper.readValue(quote("float"), Class.class)); in testClass()
[all …]
DEnumDeserializationTest.java233 assertEquals(TestEnum.OK, MAPPER.readValue(jp, TestEnum.class)); in testSimple()
234 assertEquals(TestEnum.RULES, MAPPER.readValue(jp, TestEnum.class)); in testSimple()
237 assertNull(MAPPER.readValue(jp, TestEnum.class)); in testSimple()
243 assertEquals(TestEnum.JACKSON, MAPPER.readValue(" 0 ", TestEnum.class)); in testSimple()
247 /*Object result =*/ MAPPER.readValue("\"NO-SUCH-VALUE\"", TestEnum.class); in testSimple()
263 TimeUnit result = MAPPER.readValue(json, TimeUnit.class); in testComplexEnum()
272 AnnotatedTestEnum e = MAPPER.readValue("\"JACKSON\"", AnnotatedTestEnum.class); in testAnnotated()
281 EnumWithSubClass value = MAPPER.readValue("\"A\"", EnumWithSubClass.class); in testSubclassedEnums()
290 LowerCaseEnum value = m.readValue("\"c\"", LowerCaseEnum.class); in testToStringEnums()
298 TestEnum value = MAPPER.readValue("1", TestEnum.class); in testNumbersToEnums()
[all …]
DEnumAltIdTest.java89 READER_DEFAULT.forType(TestEnum.class).readValue("\"Jackson\""); in testFailWhenCaseSensitiveAndNameIsNotUpperCase()
101 r.readValue("\"A\""); in testFailWhenCaseSensitiveAndToStringIsUpperCase()
111 READER_IGNORE_CASE.forType(TestEnum.class).readValue(quote("jackson"))); in testEnumDesIgnoringCaseWithLowerCaseContent()
117 assertEquals(LowerCaseEnum.A, r.readValue("\"A\"")); in testEnumDesIgnoringCaseWithUpperCaseToString()
128 .readValue("[\"jacksON\", \"ruLes\"]"); in testIgnoreCaseInEnumList()
137 EnumSet<TestEnum> set = r.readValue("[\"jackson\"]"); in testIgnoreCaseInEnumSet()
154 .readValue(JSON); in testIgnoreCaseViaFormat()
160 .readValue(JSON); in testIgnoreCaseViaFormat()
177 MyEnum2352_1 nonAliased = reader.readValue(quote("A")); in testEnumWithAlias()
179 MyEnum2352_1 singleAlias = reader.readValue(quote("singleAlias")); in testEnumWithAlias()
[all …]
DEnumAliasDeser2352Test.java52 MyEnum2352_1 nonAliased = reader.readValue(quote("A")); in testEnumWithAlias()
54 MyEnum2352_1 singleAlias = reader.readValue(quote("singleAlias")); in testEnumWithAlias()
56 MyEnum2352_1 multipleAliases1 = reader.readValue(quote("multipleAliases1")); in testEnumWithAlias()
58 MyEnum2352_1 multipleAliases2 = reader.readValue(quote("multipleAliases2")); in testEnumWithAlias()
66 MyEnum2352_2 nonAliased = reader.readValue(quote("a")); in testEnumWithAliasAndToStringSupported()
68 MyEnum2352_2 singleAlias = reader.readValue(quote("singleAlias")); in testEnumWithAliasAndToStringSupported()
70 MyEnum2352_2 multipleAliases1 = reader.readValue(quote("multipleAliases1")); in testEnumWithAliasAndToStringSupported()
72 MyEnum2352_2 multipleAliases2 = reader.readValue(quote("multipleAliases2")); in testEnumWithAliasAndToStringSupported()
80 MyEnum2352_3 nonAliased = reader.readValue(quote("A")); in testEnumWithAliasAndDefaultForUnknownValueEnabled()
82 MyEnum2352_3 singleAlias = reader.readValue(quote("singleAlias")); in testEnumWithAliasAndDefaultForUnknownValueEnabled()
[all …]
DUntypedDeserializationTest.java143 Object root = MAPPER.readValue(JSON, Object.class); in testSampleDoc()
197 Map<String,Object> result = (Map<String,Object>)MAPPER.readValue(JSON, Object.class); in testUntypedMap()
214 assertEquals("foo", MAPPER.readValue(quote("foo"), Object.class)); in testSimpleVanillaScalars()
216 assertEquals(Boolean.TRUE, MAPPER.readValue(" true ", Object.class)); in testSimpleVanillaScalars()
218 assertEquals(Integer.valueOf(13), MAPPER.readValue("13 ", Object.class)); in testSimpleVanillaScalars()
219 assertEquals(Double.valueOf(0.5), MAPPER.readValue("0.5 ", Object.class)); in testSimpleVanillaScalars()
224 List<?> list = (List<?>) MAPPER.readValue("[ 1, 2, 3]", Object.class); in testSimpleVanillaStructured()
231 Object root = MAPPER.readValue(aposToQuotes("{'a':3,'b':[1,2]}"), in testNestedUntypes()
252 Object ob = mapper.readValue("{\"a\":\"b\", \"nr\":1 }", Object.class); in testUntypedWithCustomScalarDesers()
274 List<?> l = (List<?>) mapper.readValue("[ true, false, 7, 0.5, \"foo\"]", Object.class); in testNonVanilla()
[all …]
DDateDeserializationTest.java101 assertEquals(value, MAPPER.readValue(""+now, java.util.Date.class)); in testDateUtil()
105 java.util.Date result = MAPPER.readValue("\""+dateStr+"\"", java.util.Date.class); in testDateUtil()
118 java.util.Date value = MAPPER.readValue(json, java.util.Date.class); in testDateUtilWithStringTimestamp()
124 value = MAPPER.readValue(json, java.util.Date.class); in testDateUtilWithStringTimestamp()
134 assertEquals(inputDate, MAPPER.readValue("\""+inputStr+"\"", java.util.Date.class)); in testDateUtilRFC1123()
145 assertEquals(inputDate, MAPPER.readValue("\""+inputStr+"\"", java.util.Date.class)); in testDateUtilRFC1123OnNonUSLocales()
158 Date inputDate = MAPPER.readValue("\""+inputStr+"\"", java.util.Date.class); in testDateUtilISO8601()
167 inputDate = MAPPER.readValue(quote(inputStr), java.util.Date.class); in testDateUtilISO8601()
175 inputDate = MAPPER.readValue(quote(inputStr), java.util.Date.class); in testDateUtilISO8601()
183 inputDate = MAPPER.readValue(quote(inputStr), java.util.Date.class); in testDateUtilISO8601()
[all …]
DCollectionDeserTest.java96 Object value = MAPPER.readValue(JSON, Object.class); in testUntypedList()
113 List<String> result = MAPPER.readValue(JSON, new TypeReference<ArrayList<String>>() { }); in testExactStringCollection()
127 EnumSet<Key> result = MAPPER.readValue(JSON, new TypeReference<EnumSet<Key>>() { }); in testHashSet()
140 CustomList result = MAPPER.readValue(quote("abc"), CustomList.class); in testCustomDeserializer()
155 List<Integer> ints = mapper.readValue("4", List.class); in testImplicitArrays()
158 … List<String> strings = mapper.readValue(quote("abc"), new TypeReference<ArrayList<String>>() { }); in testImplicitArrays()
162 int[] intArray = mapper.readValue("-7", int[].class); in testImplicitArrays()
165 String[] stringArray = mapper.readValue(quote("xyz"), String[].class); in testImplicitArrays()
170 List<XBean> xbeanList = mapper.readValue("{\"x\":4}", new TypeReference<List<XBean>>() { }); in testImplicitArrays()
174 Object ob = mapper.readValue("{\"x\":29}", XBean[].class); in testImplicitArrays()
[all …]
DMapDeserializationTest.java106 Object bound = MAPPER.readValue(json, Object.class); in testBigUntypedMap()
120 …HashMap<String,Object> result = /*(HashMap<String,Object>)*/ MAPPER.readValue(JSON, HashMap.class); in testUntypedMap2()
135 Map<?,?> result = MAPPER.readValue(JSON, Map.class); in testUntypedMap3()
149 result = MAPPER.readValue(JSON, Map.class); in testUntypedMap3()
163 final ObjectWrapperMap map = MAPPER.readValue(UNTYPED_MAP_JSON, ObjectWrapperMap.class); in testSpecialMap()
170 final Map<String, ObjectWrapper> map = MAPPER.readValue in testGenericMap()
194 Map<?,?> result = m.readValue(quote(""), Map.class); in testFromEmptyString()
208 Map<String,Integer> result = MAPPER.readValue in testExactStringIntMap()
230 Map<?,Object> result = MAPPER.readValue in testIntBooleanMap()
247 TreeMap<String,String> result = MAPPER.readValue in testExactStringStringMap()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/
DObjectReaderValueOfWithValueTypeTest.java43 when(objectReader.readValue((String) any())).thenReturn(pojo); in testValueOfStringWithValueType()
45 when(objectReader.readValue((String) any(), (Class<?>) any())).thenCallRealMethod(); in testValueOfStringWithValueType()
48 POJO result = objectReader.readValue(source, POJO.class); in testValueOfStringWithValueType()
52 verify(objectReader).readValue(source); in testValueOfStringWithValueType()
59 when(objectReader.readValue((byte[]) any())).thenReturn(pojo); in testValueOfByteArrayWithValueType()
60 when(objectReader.readValue((byte[]) any(), (Class<?>) any())).thenCallRealMethod(); in testValueOfByteArrayWithValueType()
63 POJO result = objectReader.readValue(source, POJO.class); in testValueOfByteArrayWithValueType()
67 verify(objectReader).readValue(source); in testValueOfByteArrayWithValueType()
73 when(objectReader.readValue((DataInput) any())).thenReturn(pojo); in testValueOfDataInputWithValueType()
74 when(objectReader.readValue((DataInput) any(), (Class<?>) any())).thenCallRealMethod(); in testValueOfDataInputWithValueType()
[all …]
DTestRootName.java36 Bean bean = mapper.readValue(json, Bean.class); in testRootViaMapper()
42 RootBeanWithEmpty bean2 = mapper.readValue(json, RootBeanWithEmpty.class); in testRootViaMapper()
52 mapper.readValue(aposToQuotes("{'notRudy':{'a':3}}"), Bean.class); in testRootViaMapperFails()
60 mapper.readValue(aposToQuotes("[{'rudy':{'a':3}}]"), Bean.class); in testRootViaMapperFails()
68 mapper.readValue(aposToQuotes("{}]"), Bean.class); in testRootViaMapperFails()
76 mapper.readValue(aposToQuotes("{'rudy':{'a':3}, 'extra':3}"), Bean.class); in testRootViaMapperFails()
89 reader.readValue(aposToQuotes("{'notRudy':{'a':3}}")); in testRootViaReaderFails()
97 reader.readValue(aposToQuotes("[{'rudy':{'a':3}}]")); in testRootViaReaderFails()
105 reader.readValue(aposToQuotes("{}]")); in testRootViaReaderFails()
113 reader.readValue(aposToQuotes("{'rudy':{'a':3}, 'extra':3}")); in testRootViaReaderFails()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/validate/
DFullStreamReadTest.java46 _verifyCollection(MAPPER.readValue(JSON_OK_ARRAY, List.class)); in testMapperAcceptTrailing()
47 _verifyCollection(MAPPER.readValue(JSON_OK_ARRAY_WITH_COMMENT, List.class)); in testMapperAcceptTrailing()
48 _verifyCollection(MAPPER.readValue(JSON_FAIL_ARRAY, List.class)); in testMapperAcceptTrailing()
56 assertNull(MAPPER.readValue(JSON_OK_NULL, Object.class)); in testMapperAcceptTrailing()
57 assertNull(MAPPER.readValue(JSON_OK_NULL_WITH_COMMENT, Object.class)); in testMapperAcceptTrailing()
58 assertNull(MAPPER.readValue(JSON_FAIL_NULL, Object.class)); in testMapperAcceptTrailing()
70 _verifyCollection(strict.readValue(JSON_OK_ARRAY, List.class)); in testMapperFailOnTrailing()
82 strict.readValue(JSON_FAIL_ARRAY, List.class); in testMapperFailOnTrailing()
92 strict.readValue(JSON_OK_ARRAY_WITH_COMMENT, List.class); in testMapperFailOnTrailing()
110 .readValue(JSON_OK_ARRAY_WITH_COMMENT)); in testMapperFailOnTrailing()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/filter/
DNullConversionsForContentTest.java52 NullContentUndefined<List<String>> result = MAPPER.readValue(JSON, listType); in testFailOnNullFromDefaults()
61 mapper.readValue(JSON, listType); in testFailOnNullFromDefaults()
73 mapper.readValue(JSON, listType); in testFailOnNullFromDefaults()
86 NullContentFail<List<Integer>> result = MAPPER.readValue(aposToQuotes("{'nullsOk':[null]}"), in testFailOnNullWithCollections()
97 MAPPER.readValue(JSON, typeRef); in testFailOnNullWithCollections()
106 MAPPER.readValue(JSON, new TypeReference<NullContentFail<List<String>>>() { }); in testFailOnNullWithCollections()
119 MAPPER.readValue(JSON, new TypeReference<NullContentFail<Object[]>>() { }); in testFailOnNullWithArrays()
128 MAPPER.readValue(JSON, new TypeReference<NullContentFail<String[]>>() { }); in testFailOnNullWithArrays()
142 MAPPER.readValue(JSON, new TypeReference<NullContentFail<boolean[]>>() { }); in testFailOnNullWithPrimitiveArrays()
150 MAPPER.readValue(JSON, new TypeReference<NullContentFail<int[]>>() { }); in testFailOnNullWithPrimitiveArrays()
[all …]
DNullConversionsGenericTest.java46 GeneralEmpty<Point> result = MAPPER.readValue(aposToQuotes("{'value':null}"), in testNullsToEmptyPojo()
55 /* NoCtorWrapper nogo =*/ MAPPER.readValue(aposToQuotes("{'value':null}"), in testNullsToEmptyPojo()
68 .readValue(aposToQuotes("{'value':''}")); in testEmptyStringToNullToEmptyPojo()
77 GeneralEmpty<List<String>> result = MAPPER.readValue(aposToQuotes("{'value':null}"), in testNullsToEmptyCollection()
83 GeneralEmpty<List<Integer>> result2 = MAPPER.readValue(aposToQuotes("{'value':null}"), in testNullsToEmptyCollection()
91 GeneralEmpty<Map<String,String>> result = MAPPER.readValue(aposToQuotes("{'value':null}"), in testNullsToEmptyMap()
101 GeneralEmpty<Object[]> result = MAPPER.readValue(json, in testNullsToEmptyArrays()
106 GeneralEmpty<String[]> result2 = MAPPER.readValue(json, in testNullsToEmptyArrays()
111 GeneralEmpty<int[]> result3 = MAPPER.readValue(json, in testNullsToEmptyArrays()
116 GeneralEmpty<double[]> result4 = MAPPER.readValue(json, in testNullsToEmptyArrays()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/creators/
DTestCreators.java306 ConstructorBean bean = MAPPER.readValue("{ \"x\" : 42 }", ConstructorBean.class); in testSimpleConstructor()
313 NoArgFactoryBean value = MAPPER.readValue("{\"y\":13}", NoArgFactoryBean.class); in testNoArgsFactory()
321 DoubleConstructorBean bean = MAPPER.readValue(exp.toString(), DoubleConstructorBean.class); in testSimpleDoubleConstructor()
327 BooleanConstructorBean bean = MAPPER.readValue(" true ", BooleanConstructorBean.class); in testSimpleBooleanConstructor()
330 BooleanConstructorBean2 bean2 = MAPPER.readValue(" true ", BooleanConstructorBean2.class); in testSimpleBooleanConstructor()
336 final BigIntegerWrapper result = MAPPER.readValue("17", BigIntegerWrapper.class); in testSimpleBigIntegerConstructor()
342 final BigDecimalWrapper result = MAPPER.readValue("42.5", BigDecimalWrapper.class); in testSimpleBigDecimalConstructor()
348 FactoryBean bean = MAPPER.readValue("{ \"f\" : 0.25 }", FactoryBean.class); in testSimpleFactory()
355 LongFactoryBean bean = MAPPER.readValue(String.valueOf(VALUE), LongFactoryBean.class); in testLongFactory()
362 StringFactoryBean bean = MAPPER.readValue(quote(str), StringFactoryBean.class); in testStringFactory()
[all …]
DEnumCreatorTest.java197 EnumWithCreator value = MAPPER.readValue("\"enumA\"", EnumWithCreator.class); in testCreatorEnums()
202 EnumWithBDCreator value = MAPPER.readValue("\"8.0\"", EnumWithBDCreator.class); in testCreatorEnumsFromBigDecimal()
207 EnumMap<EnumWithCreator,String> value = MAPPER.readValue("{\"enumA\":\"value\"}", in testEnumWithCreatorEnumMaps()
213 HashMap<EnumWithCreator,String> value = MAPPER.readValue("{\"enumA\":\"value\"}", in testEnumWithCreatorMaps()
219 EnumSet<EnumWithCreator> value = MAPPER.readValue("[\"enumA\"]", in testEnumWithCreatorEnumSets()
226 …EnumWithPropertiesModeJsonCreator type1 = MAPPER.readValue("{\"name\":\"TEST1\", \"description\":\… in testJsonCreatorPropertiesWithEnum()
229 …EnumWithPropertiesModeJsonCreator type2 = MAPPER.readValue("{\"name\":\"TEST3\", \"description\":\… in testJsonCreatorPropertiesWithEnum()
237 …EnumWithDelegateModeJsonCreator type1 = mapper.readValue("{\"name\":\"TEST1\", \"description\":\"T… in testJsonCreatorDelagateWithEnum()
240 …EnumWithDelegateModeJsonCreator type2 = mapper.readValue("{\"name\":\"TEST3\", \"description\":\"T… in testJsonCreatorDelagateWithEnum()
247 Object ob = MAPPER.readValue("1 ", TestEnumFromInt.class); in testEnumsFromInts()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/jsontype/
DTestPolymorphicWithDefaultImpl.java153 …Inter inter = MAPPER.readerFor(Inter.class).readValue("{\"type\": \"mine\", \"blah\": [\"a\", \"b\… in testDeserializationWithObject()
161 Inter inter = MAPPER.readerFor(Inter.class).readValue("\"a,b,c,d\""); in testDeserializationWithString()
168 Inter inter = MAPPER.readerFor(Inter.class).readValue("[\"a\", \"b\", \"c\", \"d\"]"); in testDeserializationWithArray()
175 Inter inter = MAPPER.readerFor(Inter.class).readValue("[\"a\", \"b\"]"); in testDeserializationWithArrayOfSize2()
183 Object ob = MAPPER.readerFor(DefaultWithNoClass.class).readValue("{ }"); in testDefaultAsNoClass()
185 ob = MAPPER.readerFor(DefaultWithNoClass.class).readValue("{ \"bogus\":3 }"); in testDefaultAsNoClass()
192 Object ob = MAPPER.readerFor(DefaultWithVoidAsDefault.class).readValue("{ }"); in testDefaultAsVoid()
194 ob = MAPPER.readerFor(DefaultWithVoidAsDefault.class).readValue("{ \"bogus\":3 }"); in testDefaultAsVoid()
203 Object ob = mapper.readValue("{}", MysteryPolymorphic.class); in testBadTypeAsNull()
205 ob = mapper.readValue("{ \"whatever\":13}", MysteryPolymorphic.class); in testBadTypeAsNull()
[all …]
DTestScalars.java66 result = m.readValue(json, DynamicWrapper.class); in testScalarsWithTyping()
70 result = m.readValue(json, DynamicWrapper.class); in testScalarsWithTyping()
74 result = m.readValue(json, DynamicWrapper.class); in testScalarsWithTyping()
78 result = m.readValue(json, DynamicWrapper.class); in testScalarsWithTyping()
83 result = m.readValue(json, DynamicWrapper.class); in testScalarsWithTyping()
87 result = m.readValue(json, DynamicWrapper.class); in testScalarsWithTyping()
99 result = m.readValue(json, AbstractWrapper.class); in testScalarsViaAbstractType()
103 result = m.readValue(json, AbstractWrapper.class); in testScalarsViaAbstractType()
107 result = m.readValue(json, AbstractWrapper.class); in testScalarsViaAbstractType()
111 result = m.readValue(json, AbstractWrapper.class); in testScalarsViaAbstractType()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/merge/
DPropertyMergeTest.java123 Config config = MAPPER.readValue(aposToQuotes("{'loc':{'b':3}}"), Config.class); in testBeanMergingViaProp()
128 .readValue(aposToQuotes("{'loc':{'b':2}}")); in testBeanMergingViaProp()
136 … NonMergeConfig config = MAPPER.readValue(aposToQuotes("{'loc':{'a':3}}"), NonMergeConfig.class); in testBeanMergingViaType()
143 config = mapper.readValue(aposToQuotes("{'loc':{'a':3}}"), NonMergeConfig.class); in testBeanMergingViaType()
153 … NonMergeConfig config = mapper.readValue(aposToQuotes("{'loc':{'a':3}}"), NonMergeConfig.class); in testBeanMergingViaGlobal()
162 .readValue(aposToQuotes("{'name':{'last':'Brown'}}")); in testBeanMergingViaGlobal()
170 NoSetterConfig config = MAPPER.readValue(aposToQuotes("{'value':{'b':99}}"), in testBeanMergingWithoutSetter()
188 .readValue(aposToQuotes("{'mergeableBean': {'foo': 'newFoo'}}")); in testBeanMergeUsingConstructors()
207 .readValue("[1, 3]")); in testBeanAsArrayMerging()
213 .readValue("[9]")); in testBeanAsArrayMerging()
[all …]
/external/exoplayer/tree/library/common/src/test/java/com/google/android/exoplayer2/util/
DParsableByteArrayTest.java53 int readValue = testArray.readShort(); in testReadShort() local
56 assertThat(readValue).isEqualTo(testValue); in testReadShort()
62 readValue = testArray.readShort(); in testReadShort()
63 assertThat(readValue).isEqualTo(testValue); in testReadShort()
79 int readValue = testArray.readInt(); in testReadInt() local
82 assertThat(readValue).isEqualTo(testValue); in testReadInt()
88 readValue = testArray.readInt(); in testReadInt()
89 assertThat(readValue).isEqualTo(testValue); in testReadInt()
105 long readValue = testArray.readUnsignedInt(); in testReadUnsignedInt() local
108 assertThat(readValue).isEqualTo(testValue); in testReadUnsignedInt()
[all …]
/external/libese/apps/weaver/tests/
Dweaver_test.cpp66 uint8_t readValue[kEseWeaverValueSize]; in TEST_F() local
68 ASSERT_EQ(ESE_APP_RESULT_OK, ese_weaver_read(&mSession, slotId, KEY, readValue, &timeout)); in TEST_F()
69 ASSERT_EQ(0, memcmp(VALUE, readValue, kEseWeaverValueSize)); in TEST_F()
76 uint8_t readValue[kEseWeaverValueSize]; in TEST_F() local
79 ese_weaver_read(&mSession, slotId, WRONG_KEY, readValue, &timeout)); in TEST_F()
80 ASSERT_NE(0, memcmp(VALUE, readValue, kEseWeaverValueSize)); in TEST_F()
91 uint8_t readValue[kEseWeaverValueSize]; in TEST_F() local
93 ASSERT_EQ(ESE_APP_RESULT_OK, ese_weaver_read(&mSession, slotId, KEY, readValue, &timeout)); in TEST_F()
96 ASSERT_EQ(0, memcmp(readValue, expectedValue, kEseWeaverValueSize)); in TEST_F()

12345678910>>...18