Lines Matching refs:value

49   static bool TryConversion(Handle<mirror::Class> from, Handle<mirror::Class> to, JValue* value)  in TryConversion()  argument
57 return ConvertJValueCommon(throw_wmt, from.Get(), to.Get(), value); in TryConversion()
78 JValue value = JValue::FromPrimitive(static_cast<int8_t>(3)); in TEST_F() local
79 ASSERT_TRUE(TryConversion(from, to, &value)); in TEST_F()
80 ASSERT_EQ(3, value.GetI()); in TEST_F()
91 JValue value = JValue::FromPrimitive(raw_value); in TEST_F() local
92 ASSERT_TRUE(TryConversion(from, to, &value)); in TEST_F()
94 ASSERT_EQ(static_cast<int64_t>(raw_value), value.GetJ()); in TEST_F()
103 JValue value = JValue::FromPrimitive(-16); in TEST_F() local
104 ASSERT_TRUE(TryConversion(from, to, &value)); in TEST_F()
106 ASSERT_FLOAT_EQ(-16.0f, value.GetF()); in TEST_F()
115 JValue value; in TEST_F() local
116 value.SetB(0); in TEST_F()
117 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
129 JValue value; in TEST_F() local
130 value.SetS(0x1234); in TEST_F()
131 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
143 JValue value; in TEST_F() local
144 value.SetD(1e72); in TEST_F()
145 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
157 JValue value; in TEST_F() local
158 value.SetZ(true); in TEST_F()
159 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
174 JValue value = JValue::FromPrimitive(kInitialValue); in TEST_F() local
175 Handle<mirror::Object> boxed_value = hs.NewHandle(BoxPrimitive(Primitive::kPrimInt, value)); in TEST_F()
178 value.SetL(boxed_value.Get()); in TEST_F()
179 ASSERT_TRUE(TryConversion(from, to, &value)); in TEST_F()
182 ASSERT_TRUE(UnboxPrimitiveForResult(value.GetL(), cl->FindPrimitiveClass('I'), &unboxed_value)); in TEST_F()
190 JValue value = JValue::FromPrimitive(3.733e2); in TEST_F() local
191 Handle<mirror::Object> boxed_value = hs.NewHandle(BoxPrimitive(Primitive::kPrimDouble, value)); in TEST_F()
194 value.SetL(boxed_value.Get()); in TEST_F()
196 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
211 JValue value = JValue::FromPrimitive(kInitialValue); in TEST_F() local
214 ASSERT_TRUE(TryConversion(from, to, &value)); in TEST_F()
217 ASSERT_TRUE(UnboxPrimitiveForResult(value.GetL(), from.Get(), &unboxed_to_value)); in TEST_F()
226 JValue value = JValue::FromPrimitive(kInitialValue); in TEST_F() local
229 ASSERT_TRUE(TryConversion(from, to, &value)); in TEST_F()
232 ASSERT_TRUE(UnboxPrimitiveForResult(value.GetL(), from.Get(), &unboxed_to_value)); in TEST_F()
241 JValue value = JValue::FromPrimitive(kInitialValue); in TEST_F() local
244 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
255 JValue value = JValue::FromPrimitive(kInitialValue); in TEST_F() local
258 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
269 JValue value = JValue::FromPrimitive(kInitialValue); in TEST_F() local
272 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
287 JValue value = JValue::FromPrimitive(kInitialValue); in TEST_F() local
288 Handle<mirror::Object> boxed_value = hs.NewHandle(BoxPrimitive(Primitive::kPrimInt, value)); in TEST_F()
291 value.SetL(boxed_value.Get()); in TEST_F()
292 ASSERT_TRUE(TryConversion(from, to, &value)); in TEST_F()
294 ASSERT_EQ(kInitialValue, value.GetI()); in TEST_F()
302 JValue value = JValue::FromPrimitive(kInitialValue); in TEST_F() local
303 Handle<mirror::Object> boxed_value = hs.NewHandle(BoxPrimitive(Primitive::kPrimInt, value)); in TEST_F()
306 value.SetL(boxed_value.Get()); in TEST_F()
307 ASSERT_TRUE(TryConversion(from, to, &value)); in TEST_F()
308 ASSERT_EQ(kInitialValue, value.GetJ()); in TEST_F()
315 JValue value = JValue::FromPrimitive(101); in TEST_F() local
319 value.SetL(boxed_value.Get()); in TEST_F()
320 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
333 JValue value; in TEST_F() local
334 value.SetL(cl->FindPrimitiveClass('V')); in TEST_F()
335 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
346 JValue value = JValue::FromPrimitive(kInitialValue); in TEST_F() local
347 Handle<mirror::Object> boxed_value = hs.NewHandle(BoxPrimitive(Primitive::kPrimInt, value)); in TEST_F()
350 value.SetL(boxed_value.Get()); in TEST_F()
351 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()
362 JValue value = JValue::FromPrimitive(kInitialValue); in TEST_F() local
363 Handle<mirror::Object> boxed_value = hs.NewHandle(BoxPrimitive(Primitive::kPrimDouble, value)); in TEST_F()
366 value.SetL(boxed_value.Get()); in TEST_F()
367 ASSERT_FALSE(TryConversion(from, to, &value)); in TEST_F()