blob: abe68ef8d7bd944e407bcc7d8abdc6ec01cdde01 [file] [log] [blame]
Ian Rogers53b8b092014-03-13 23:45:53 -07001/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "reflection.h"
18
Brian Carlstrom8edba0b2014-03-14 16:11:43 -070019#include <float.h>
Ian Rogers88e46a32014-03-14 14:37:59 -070020#include <limits.h>
Ian Rogers53b8b092014-03-13 23:45:53 -070021
22#include "common_compiler_test.h"
23#include "mirror/art_method-inl.h"
24
25namespace art {
26
27// TODO: Convert to CommonRuntimeTest. Currently MakeExecutable is used.
28class ReflectionTest : public CommonCompilerTest {
29 protected:
30 virtual void SetUp() {
31 CommonCompilerTest::SetUp();
32
33 vm_ = Runtime::Current()->GetJavaVM();
34
35 // Turn on -verbose:jni for the JNI tests.
36 // gLogVerbosity.jni = true;
37
38 vm_->AttachCurrentThread(&env_, NULL);
39
40 ScopedLocalRef<jclass> aioobe(env_,
41 env_->FindClass("java/lang/ArrayIndexOutOfBoundsException"));
42 CHECK(aioobe.get() != NULL);
43 aioobe_ = reinterpret_cast<jclass>(env_->NewGlobalRef(aioobe.get()));
44
45 ScopedLocalRef<jclass> ase(env_, env_->FindClass("java/lang/ArrayStoreException"));
46 CHECK(ase.get() != NULL);
47 ase_ = reinterpret_cast<jclass>(env_->NewGlobalRef(ase.get()));
48
49 ScopedLocalRef<jclass> sioobe(env_,
50 env_->FindClass("java/lang/StringIndexOutOfBoundsException"));
51 CHECK(sioobe.get() != NULL);
52 sioobe_ = reinterpret_cast<jclass>(env_->NewGlobalRef(sioobe.get()));
53 }
54
55 void CleanUpJniEnv() {
56 if (aioobe_ != NULL) {
57 env_->DeleteGlobalRef(aioobe_);
58 aioobe_ = NULL;
59 }
60 if (ase_ != NULL) {
61 env_->DeleteGlobalRef(ase_);
62 ase_ = NULL;
63 }
64 if (sioobe_ != NULL) {
65 env_->DeleteGlobalRef(sioobe_);
66 sioobe_ = NULL;
67 }
68 }
69
70 virtual void TearDown() {
71 CleanUpJniEnv();
72 CommonCompilerTest::TearDown();
73 }
74
75 jclass GetPrimitiveClass(char descriptor) {
76 ScopedObjectAccess soa(env_);
77 mirror::Class* c = class_linker_->FindPrimitiveClass(descriptor);
78 CHECK(c != nullptr);
79 return soa.AddLocalReference<jclass>(c);
80 }
81
82 void ReflectionTestMakeExecutable(mirror::ArtMethod** method,
83 mirror::Object** receiver,
84 bool is_static, const char* method_name,
85 const char* method_signature)
86 SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
87 const char* class_name = is_static ? "StaticLeafMethods" : "NonStaticLeafMethods";
88 jobject jclass_loader(LoadDex(class_name));
89 Thread* self = Thread::Current();
Mathieu Chartiereb8167a2014-05-07 15:43:14 -070090 StackHandleScope<2> hs(self);
91 Handle<mirror::ClassLoader> class_loader(
92 hs.NewHandle(
93 ScopedObjectAccessUnchecked(self).Decode<mirror::ClassLoader*>(jclass_loader)));
Ian Rogers53b8b092014-03-13 23:45:53 -070094 if (is_static) {
95 MakeExecutable(ScopedObjectAccessUnchecked(self).Decode<mirror::ClassLoader*>(jclass_loader),
96 class_name);
97 } else {
98 MakeExecutable(nullptr, "java.lang.Class");
99 MakeExecutable(nullptr, "java.lang.Object");
100 MakeExecutable(ScopedObjectAccessUnchecked(self).Decode<mirror::ClassLoader*>(jclass_loader),
101 class_name);
102 }
103
104 mirror::Class* c = class_linker_->FindClass(self, DotToDescriptor(class_name).c_str(),
105 class_loader);
106 CHECK(c != NULL);
107
108 *method = is_static ? c->FindDirectMethod(method_name, method_signature)
109 : c->FindVirtualMethod(method_name, method_signature);
110 CHECK(method != nullptr);
111
Sebastien Hertz4e99b3d2014-06-24 14:35:40 +0200112 if (is_static) {
113 *receiver = nullptr;
114 } else {
115 // Ensure class is initialized before allocating object
116 StackHandleScope<1> hs(self);
117 Handle<mirror::Class> h_class(hs.NewHandle(c));
118 bool initialized = class_linker_->EnsureInitialized(h_class, true, true);
119 CHECK(initialized);
120 *receiver = c->AllocObject(self);
121 }
Ian Rogers53b8b092014-03-13 23:45:53 -0700122
123 // Start runtime.
124 bool started = runtime_->Start();
125 CHECK(started);
126 self->TransitionFromSuspendedToRunnable();
127 }
128
129 void InvokeNopMethod(bool is_static) {
130 ScopedObjectAccess soa(env_);
131 mirror::ArtMethod* method;
132 mirror::Object* receiver;
133 ReflectionTestMakeExecutable(&method, &receiver, is_static, "nop", "()V");
134 InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), nullptr);
135 }
136
137 void InvokeIdentityByteMethod(bool is_static) {
138 ScopedObjectAccess soa(env_);
139 mirror::ArtMethod* method;
140 mirror::Object* receiver;
141 ReflectionTestMakeExecutable(&method, &receiver, is_static, "identity", "(B)B");
142 jvalue args[1];
143
144 args[0].b = 0;
145 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
146 EXPECT_EQ(0, result.GetB());
147
148 args[0].b = -1;
149 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
150 EXPECT_EQ(-1, result.GetB());
151
152 args[0].b = SCHAR_MAX;
153 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
154 EXPECT_EQ(SCHAR_MAX, result.GetB());
155
156 args[0].b = (SCHAR_MIN << 24) >> 24;
157 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
158 EXPECT_EQ(SCHAR_MIN, result.GetB());
159 }
160
161 void InvokeIdentityIntMethod(bool is_static) {
162 ScopedObjectAccess soa(env_);
163 mirror::ArtMethod* method;
164 mirror::Object* receiver;
165 ReflectionTestMakeExecutable(&method, &receiver, is_static, "identity", "(I)I");
166 jvalue args[1];
167
168 args[0].i = 0;
169 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
170 EXPECT_EQ(0, result.GetI());
171
172 args[0].i = -1;
173 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
174 EXPECT_EQ(-1, result.GetI());
175
176 args[0].i = INT_MAX;
177 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
178 EXPECT_EQ(INT_MAX, result.GetI());
179
180 args[0].i = INT_MIN;
181 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
182 EXPECT_EQ(INT_MIN, result.GetI());
183 }
184
185 void InvokeIdentityDoubleMethod(bool is_static) {
186 ScopedObjectAccess soa(env_);
187 mirror::ArtMethod* method;
188 mirror::Object* receiver;
189 ReflectionTestMakeExecutable(&method, &receiver, is_static, "identity", "(D)D");
190 jvalue args[1];
191
192 args[0].d = 0.0;
193 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
194 EXPECT_EQ(0.0, result.GetD());
195
196 args[0].d = -1.0;
197 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
198 EXPECT_EQ(-1.0, result.GetD());
199
200 args[0].d = DBL_MAX;
201 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
202 EXPECT_EQ(DBL_MAX, result.GetD());
203
204 args[0].d = DBL_MIN;
205 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
206 EXPECT_EQ(DBL_MIN, result.GetD());
207 }
208
209 void InvokeSumIntIntMethod(bool is_static) {
210 ScopedObjectAccess soa(env_);
211 mirror::ArtMethod* method;
212 mirror::Object* receiver;
213 ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(II)I");
214 jvalue args[2];
215
216 args[0].i = 1;
217 args[1].i = 2;
218 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
219 EXPECT_EQ(3, result.GetI());
220
221 args[0].i = -2;
222 args[1].i = 5;
223 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
224 EXPECT_EQ(3, result.GetI());
225
226 args[0].i = INT_MAX;
227 args[1].i = INT_MIN;
228 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
229 EXPECT_EQ(-1, result.GetI());
230
231 args[0].i = INT_MAX;
232 args[1].i = INT_MAX;
233 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
234 EXPECT_EQ(-2, result.GetI());
235 }
236
237 void InvokeSumIntIntIntMethod(bool is_static) {
238 ScopedObjectAccess soa(env_);
239 mirror::ArtMethod* method;
240 mirror::Object* receiver;
241 ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(III)I");
242 jvalue args[3];
243
244 args[0].i = 0;
245 args[1].i = 0;
246 args[2].i = 0;
247 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
248 EXPECT_EQ(0, result.GetI());
249
250 args[0].i = 1;
251 args[1].i = 2;
252 args[2].i = 3;
253 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
254 EXPECT_EQ(6, result.GetI());
255
256 args[0].i = -1;
257 args[1].i = 2;
258 args[2].i = -3;
259 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
260 EXPECT_EQ(-2, result.GetI());
261
262 args[0].i = INT_MAX;
263 args[1].i = INT_MIN;
264 args[2].i = INT_MAX;
265 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
266 EXPECT_EQ(2147483646, result.GetI());
267
268 args[0].i = INT_MAX;
269 args[1].i = INT_MAX;
270 args[2].i = INT_MAX;
271 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
272 EXPECT_EQ(2147483645, result.GetI());
273 }
274
275 void InvokeSumIntIntIntIntMethod(bool is_static) {
276 ScopedObjectAccess soa(env_);
277 mirror::ArtMethod* method;
278 mirror::Object* receiver;
279 ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(IIII)I");
280 jvalue args[4];
281
282 args[0].i = 0;
283 args[1].i = 0;
284 args[2].i = 0;
285 args[3].i = 0;
286 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
287 EXPECT_EQ(0, result.GetI());
288
289 args[0].i = 1;
290 args[1].i = 2;
291 args[2].i = 3;
292 args[3].i = 4;
293 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
294 EXPECT_EQ(10, result.GetI());
295
296 args[0].i = -1;
297 args[1].i = 2;
298 args[2].i = -3;
299 args[3].i = 4;
300 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
301 EXPECT_EQ(2, result.GetI());
302
303 args[0].i = INT_MAX;
304 args[1].i = INT_MIN;
305 args[2].i = INT_MAX;
306 args[3].i = INT_MIN;
307 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
308 EXPECT_EQ(-2, result.GetI());
309
310 args[0].i = INT_MAX;
311 args[1].i = INT_MAX;
312 args[2].i = INT_MAX;
313 args[3].i = INT_MAX;
314 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
315 EXPECT_EQ(-4, result.GetI());
316 }
317
318 void InvokeSumIntIntIntIntIntMethod(bool is_static) {
319 ScopedObjectAccess soa(env_);
320 mirror::ArtMethod* method;
321 mirror::Object* receiver;
322 ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(IIIII)I");
323 jvalue args[5];
324
325 args[0].i = 0;
326 args[1].i = 0;
327 args[2].i = 0;
328 args[3].i = 0;
329 args[4].i = 0;
330 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
331 EXPECT_EQ(0, result.GetI());
332
333 args[0].i = 1;
334 args[1].i = 2;
335 args[2].i = 3;
336 args[3].i = 4;
337 args[4].i = 5;
338 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
339 EXPECT_EQ(15, result.GetI());
340
341 args[0].i = -1;
342 args[1].i = 2;
343 args[2].i = -3;
344 args[3].i = 4;
345 args[4].i = -5;
346 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
347 EXPECT_EQ(-3, result.GetI());
348
349 args[0].i = INT_MAX;
350 args[1].i = INT_MIN;
351 args[2].i = INT_MAX;
352 args[3].i = INT_MIN;
353 args[4].i = INT_MAX;
354 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
355 EXPECT_EQ(2147483645, result.GetI());
356
357 args[0].i = INT_MAX;
358 args[1].i = INT_MAX;
359 args[2].i = INT_MAX;
360 args[3].i = INT_MAX;
361 args[4].i = INT_MAX;
362 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
363 EXPECT_EQ(2147483643, result.GetI());
364 }
365
366 void InvokeSumDoubleDoubleMethod(bool is_static) {
367 ScopedObjectAccess soa(env_);
368 mirror::ArtMethod* method;
369 mirror::Object* receiver;
370 ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(DD)D");
371 jvalue args[2];
372
373 args[0].d = 0.0;
374 args[1].d = 0.0;
375 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
376 EXPECT_EQ(0.0, result.GetD());
377
378 args[0].d = 1.0;
379 args[1].d = 2.0;
380 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
381 EXPECT_EQ(3.0, result.GetD());
382
383 args[0].d = 1.0;
384 args[1].d = -2.0;
385 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
386 EXPECT_EQ(-1.0, result.GetD());
387
388 args[0].d = DBL_MAX;
389 args[1].d = DBL_MIN;
390 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
391 EXPECT_EQ(1.7976931348623157e308, result.GetD());
392
393 args[0].d = DBL_MAX;
394 args[1].d = DBL_MAX;
395 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
396 EXPECT_EQ(INFINITY, result.GetD());
397 }
398
399 void InvokeSumDoubleDoubleDoubleMethod(bool is_static) {
400 ScopedObjectAccess soa(env_);
401 mirror::ArtMethod* method;
402 mirror::Object* receiver;
403 ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(DDD)D");
404 jvalue args[3];
405
406 args[0].d = 0.0;
407 args[1].d = 0.0;
408 args[2].d = 0.0;
409 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
410 EXPECT_EQ(0.0, result.GetD());
411
412 args[0].d = 1.0;
413 args[1].d = 2.0;
414 args[2].d = 3.0;
415 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
416 EXPECT_EQ(6.0, result.GetD());
417
418 args[0].d = 1.0;
419 args[1].d = -2.0;
420 args[2].d = 3.0;
421 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
422 EXPECT_EQ(2.0, result.GetD());
423 }
424
425 void InvokeSumDoubleDoubleDoubleDoubleMethod(bool is_static) {
426 ScopedObjectAccess soa(env_);
427 mirror::ArtMethod* method;
428 mirror::Object* receiver;
429 ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(DDDD)D");
430 jvalue args[4];
431
432 args[0].d = 0.0;
433 args[1].d = 0.0;
434 args[2].d = 0.0;
435 args[3].d = 0.0;
436 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
437 EXPECT_EQ(0.0, result.GetD());
438
439 args[0].d = 1.0;
440 args[1].d = 2.0;
441 args[2].d = 3.0;
442 args[3].d = 4.0;
443 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
444 EXPECT_EQ(10.0, result.GetD());
445
446 args[0].d = 1.0;
447 args[1].d = -2.0;
448 args[2].d = 3.0;
449 args[3].d = -4.0;
450 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
451 EXPECT_EQ(-2.0, result.GetD());
452 }
453
454 void InvokeSumDoubleDoubleDoubleDoubleDoubleMethod(bool is_static) {
455 ScopedObjectAccess soa(env_);
456 mirror::ArtMethod* method;
457 mirror::Object* receiver;
458 ReflectionTestMakeExecutable(&method, &receiver, is_static, "sum", "(DDDDD)D");
459 jvalue args[5];
460
461 args[0].d = 0.0;
462 args[1].d = 0.0;
463 args[2].d = 0.0;
464 args[3].d = 0.0;
465 args[4].d = 0.0;
466 JValue result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
467 EXPECT_EQ(0.0, result.GetD());
468
469 args[0].d = 1.0;
470 args[1].d = 2.0;
471 args[2].d = 3.0;
472 args[3].d = 4.0;
473 args[4].d = 5.0;
474 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
475 EXPECT_EQ(15.0, result.GetD());
476
477 args[0].d = 1.0;
478 args[1].d = -2.0;
479 args[2].d = 3.0;
480 args[3].d = -4.0;
481 args[4].d = 5.0;
482 result = InvokeWithJValues(soa, receiver, soa.EncodeMethod(method), args);
483 EXPECT_EQ(3.0, result.GetD());
484 }
485
486 JavaVMExt* vm_;
487 JNIEnv* env_;
488 jclass aioobe_;
489 jclass ase_;
490 jclass sioobe_;
491};
492
493TEST_F(ReflectionTest, StaticMainMethod) {
494 TEST_DISABLED_FOR_PORTABLE();
495 ScopedObjectAccess soa(Thread::Current());
496 jobject jclass_loader = LoadDex("Main");
Mathieu Chartiereb8167a2014-05-07 15:43:14 -0700497 StackHandleScope<1> hs(soa.Self());
498 Handle<mirror::ClassLoader> class_loader(
499 hs.NewHandle(soa.Decode<mirror::ClassLoader*>(jclass_loader)));
Ian Rogers53b8b092014-03-13 23:45:53 -0700500 CompileDirectMethod(class_loader, "Main", "main", "([Ljava/lang/String;)V");
501
502 mirror::Class* klass = class_linker_->FindClass(soa.Self(), "LMain;", class_loader);
503 ASSERT_TRUE(klass != NULL);
504
505 mirror::ArtMethod* method = klass->FindDirectMethod("main", "([Ljava/lang/String;)V");
506 ASSERT_TRUE(method != NULL);
507
508 // Start runtime.
509 bool started = runtime_->Start();
510 CHECK(started);
511 soa.Self()->TransitionFromSuspendedToRunnable();
512
513 jvalue args[1];
514 args[0].l = nullptr;
515 InvokeWithJValues(soa, nullptr, soa.EncodeMethod(method), args);
516}
517
518TEST_F(ReflectionTest, StaticNopMethod) {
519 TEST_DISABLED_FOR_PORTABLE();
520 InvokeNopMethod(true);
521}
522
523TEST_F(ReflectionTest, NonStaticNopMethod) {
524 TEST_DISABLED_FOR_PORTABLE();
525 InvokeNopMethod(false);
526}
527
528TEST_F(ReflectionTest, StaticIdentityByteMethod) {
529 TEST_DISABLED_FOR_PORTABLE();
530 InvokeIdentityByteMethod(true);
531}
532
533TEST_F(ReflectionTest, NonStaticIdentityByteMethod) {
534 TEST_DISABLED_FOR_PORTABLE();
535 InvokeIdentityByteMethod(false);
536}
537
538TEST_F(ReflectionTest, StaticIdentityIntMethod) {
539 TEST_DISABLED_FOR_PORTABLE();
540 InvokeIdentityIntMethod(true);
541}
542
543TEST_F(ReflectionTest, NonStaticIdentityIntMethod) {
544 TEST_DISABLED_FOR_PORTABLE();
545 InvokeIdentityIntMethod(false);
546}
547
548TEST_F(ReflectionTest, StaticIdentityDoubleMethod) {
549 TEST_DISABLED_FOR_PORTABLE();
550 InvokeIdentityDoubleMethod(true);
551}
552
553TEST_F(ReflectionTest, NonStaticIdentityDoubleMethod) {
554 TEST_DISABLED_FOR_PORTABLE();
555 InvokeIdentityDoubleMethod(false);
556}
557
558TEST_F(ReflectionTest, StaticSumIntIntMethod) {
559 TEST_DISABLED_FOR_PORTABLE();
560 InvokeSumIntIntMethod(true);
561}
562
563TEST_F(ReflectionTest, NonStaticSumIntIntMethod) {
564 TEST_DISABLED_FOR_PORTABLE();
565 InvokeSumIntIntMethod(false);
566}
567
568TEST_F(ReflectionTest, StaticSumIntIntIntMethod) {
569 TEST_DISABLED_FOR_PORTABLE();
570 InvokeSumIntIntIntMethod(true);
571}
572
573TEST_F(ReflectionTest, NonStaticSumIntIntIntMethod) {
574 TEST_DISABLED_FOR_PORTABLE();
575 InvokeSumIntIntIntMethod(false);
576}
577
578TEST_F(ReflectionTest, StaticSumIntIntIntIntMethod) {
579 TEST_DISABLED_FOR_PORTABLE();
580 InvokeSumIntIntIntIntMethod(true);
581}
582
583TEST_F(ReflectionTest, NonStaticSumIntIntIntIntMethod) {
584 TEST_DISABLED_FOR_PORTABLE();
585 InvokeSumIntIntIntIntMethod(false);
586}
587
588TEST_F(ReflectionTest, StaticSumIntIntIntIntIntMethod) {
589 TEST_DISABLED_FOR_PORTABLE();
590 InvokeSumIntIntIntIntIntMethod(true);
591}
592
593TEST_F(ReflectionTest, NonStaticSumIntIntIntIntIntMethod) {
594 TEST_DISABLED_FOR_PORTABLE();
595 InvokeSumIntIntIntIntIntMethod(false);
596}
597
598TEST_F(ReflectionTest, StaticSumDoubleDoubleMethod) {
599 TEST_DISABLED_FOR_PORTABLE();
600 InvokeSumDoubleDoubleMethod(true);
601}
602
603TEST_F(ReflectionTest, NonStaticSumDoubleDoubleMethod) {
604 TEST_DISABLED_FOR_PORTABLE();
605 InvokeSumDoubleDoubleMethod(false);
606}
607
608TEST_F(ReflectionTest, StaticSumDoubleDoubleDoubleMethod) {
609 TEST_DISABLED_FOR_PORTABLE();
610 InvokeSumDoubleDoubleDoubleMethod(true);
611}
612
613TEST_F(ReflectionTest, NonStaticSumDoubleDoubleDoubleMethod) {
614 TEST_DISABLED_FOR_PORTABLE();
615 InvokeSumDoubleDoubleDoubleMethod(false);
616}
617
618TEST_F(ReflectionTest, StaticSumDoubleDoubleDoubleDoubleMethod) {
619 TEST_DISABLED_FOR_PORTABLE();
620 InvokeSumDoubleDoubleDoubleDoubleMethod(true);
621}
622
623TEST_F(ReflectionTest, NonStaticSumDoubleDoubleDoubleDoubleMethod) {
624 TEST_DISABLED_FOR_PORTABLE();
625 InvokeSumDoubleDoubleDoubleDoubleMethod(false);
626}
627
628TEST_F(ReflectionTest, StaticSumDoubleDoubleDoubleDoubleDoubleMethod) {
629 TEST_DISABLED_FOR_PORTABLE();
630 InvokeSumDoubleDoubleDoubleDoubleDoubleMethod(true);
631}
632
633TEST_F(ReflectionTest, NonStaticSumDoubleDoubleDoubleDoubleDoubleMethod) {
634 TEST_DISABLED_FOR_PORTABLE();
635 InvokeSumDoubleDoubleDoubleDoubleDoubleMethod(false);
636}
637
638} // namespace art