1# Copyright (C) 2018 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15.class public LTestCase;
16
17.super Ljava/lang/Object;
18
19#
20## CHECK-START: void TestCase.foo(java.lang.Object) inliner (after)
21## CHECK-DAG: InvokeStaticOrDirect method_name:TestCase.bar always_throws:true
22## CHECK-DAG: InvokeStaticOrDirect method_name:TestCase.bad
23.method public static foo(Ljava/lang/Object;)V
24  .registers 1
25  if-nez v0, :Skip1
26  invoke-static {}, LTestCase;->bar()V
27:Skip1
28  if-nez v0, :Skip2
29  invoke-static {}, LTestCase;->bad()Lwont/be/Resolvable;
30:Skip2
31  return-void
32.end method
33
34#
35# Method bar() that verifies (but is never called).
36#
37.method public static bar()V
38  .registers 1
39  new-instance v0, Ljava/lang/RuntimeException;
40  invoke-direct {v0}, Ljava/lang/RuntimeException;-><init>()V
41  throw v0
42.end method
43
44#
45# Method bad() that fails to verify (but is never called).
46#
47.method public static bad()Lwont/be/Resolvable;
48  .registers 1
49  invoke-static {}, LTestCase;->bar()Lwont/be/Resolvable;
50  move-result-object v0
51  return-object v0
52.end method
53
54