1*795d594fSAndroid Build Coastguard Worker /* 2*795d594fSAndroid Build Coastguard Worker * Copyright (C) 2024 The Android Open Source Project 3*795d594fSAndroid Build Coastguard Worker * 4*795d594fSAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 5*795d594fSAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 6*795d594fSAndroid Build Coastguard Worker * You may obtain a copy of the License at 7*795d594fSAndroid Build Coastguard Worker * 8*795d594fSAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 9*795d594fSAndroid Build Coastguard Worker * 10*795d594fSAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 11*795d594fSAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 12*795d594fSAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*795d594fSAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 14*795d594fSAndroid Build Coastguard Worker * limitations under the License. 15*795d594fSAndroid Build Coastguard Worker */ 16*795d594fSAndroid Build Coastguard Worker 17*795d594fSAndroid Build Coastguard Worker public class Main { 18*795d594fSAndroid Build Coastguard Worker static int static_int = 0; 19*795d594fSAndroid Build Coastguard Worker static long static_long = 0; 20*795d594fSAndroid Build Coastguard Worker main(String[] args)21*795d594fSAndroid Build Coastguard Worker public static void main(String[] args) { 22*795d594fSAndroid Build Coastguard Worker $noinline$testSameStartEndInt(); 23*795d594fSAndroid Build Coastguard Worker assertIntEquals(0, static_int); 24*795d594fSAndroid Build Coastguard Worker $noinline$testStartBiggerThanEndInt(); 25*795d594fSAndroid Build Coastguard Worker assertIntEquals(0, static_int); 26*795d594fSAndroid Build Coastguard Worker $noinline$testUnknownParameterValuesInt(10, 1); 27*795d594fSAndroid Build Coastguard Worker assertIntEquals(0, static_int); 28*795d594fSAndroid Build Coastguard Worker $noinline$testKnownParameterValuesInt(); 29*795d594fSAndroid Build Coastguard Worker assertIntEquals(0, static_int); 30*795d594fSAndroid Build Coastguard Worker $noinline$testKnownParameterValuesInt_WithOverflow(); 31*795d594fSAndroid Build Coastguard Worker assertIntEquals(0, static_int); 32*795d594fSAndroid Build Coastguard Worker 33*795d594fSAndroid Build Coastguard Worker $noinline$testSameStartEndLong(); 34*795d594fSAndroid Build Coastguard Worker assertLongEquals(0L, static_long); 35*795d594fSAndroid Build Coastguard Worker $noinline$testStartBiggerThanEndLong(); 36*795d594fSAndroid Build Coastguard Worker assertLongEquals(0L, static_long); 37*795d594fSAndroid Build Coastguard Worker $noinline$testUnknownParameterValuesLong(10L, 1L); 38*795d594fSAndroid Build Coastguard Worker assertLongEquals(0L, static_long); 39*795d594fSAndroid Build Coastguard Worker $noinline$testKnownParameterValuesLong(); 40*795d594fSAndroid Build Coastguard Worker assertLongEquals(0L, static_long); 41*795d594fSAndroid Build Coastguard Worker $noinline$testKnownParameterValuesLong_WithOverflow(); 42*795d594fSAndroid Build Coastguard Worker assertLongEquals(0L, static_long); 43*795d594fSAndroid Build Coastguard Worker } 44*795d594fSAndroid Build Coastguard Worker 45*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testSameStartEndInt() loop_optimization (before) 46*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 47*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] 48*795d594fSAndroid Build Coastguard Worker 49*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testSameStartEndInt() loop_optimization (after) 50*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Const1:i\d+>> IntConstant 1 51*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Const1>>] 52*795d594fSAndroid Build Coastguard Worker 53*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testSameStartEndInt() dead_code_elimination$after_loop_opt (before) 54*795d594fSAndroid Build Coastguard Worker /// CHECK: Phi 55*795d594fSAndroid Build Coastguard Worker /// CHECK: GreaterThanOrEqual 56*795d594fSAndroid Build Coastguard Worker /// CHECK: If 57*795d594fSAndroid Build Coastguard Worker /// CHECK: StaticFieldSet 58*795d594fSAndroid Build Coastguard Worker 59*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testSameStartEndInt() dead_code_elimination$after_loop_opt (after) 60*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: Phi 61*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: GreaterThanOrEqual 62*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: If 63*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: StaticFieldSet $noinline$testSameStartEndInt()64*795d594fSAndroid Build Coastguard Worker private static void $noinline$testSameStartEndInt() { 65*795d594fSAndroid Build Coastguard Worker for (int i = 2; i < 2; i++) { 66*795d594fSAndroid Build Coastguard Worker static_int = 24; 67*795d594fSAndroid Build Coastguard Worker } 68*795d594fSAndroid Build Coastguard Worker } 69*795d594fSAndroid Build Coastguard Worker 70*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testStartBiggerThanEndInt() loop_optimization (before) 71*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 72*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] 73*795d594fSAndroid Build Coastguard Worker 74*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testStartBiggerThanEndInt() loop_optimization (after) 75*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Const1:i\d+>> IntConstant 1 76*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Const1>>] 77*795d594fSAndroid Build Coastguard Worker 78*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testStartBiggerThanEndInt() dead_code_elimination$after_loop_opt (before) 79*795d594fSAndroid Build Coastguard Worker /// CHECK: Phi 80*795d594fSAndroid Build Coastguard Worker /// CHECK: GreaterThanOrEqual 81*795d594fSAndroid Build Coastguard Worker /// CHECK: If 82*795d594fSAndroid Build Coastguard Worker /// CHECK: StaticFieldSet 83*795d594fSAndroid Build Coastguard Worker 84*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testStartBiggerThanEndInt() dead_code_elimination$after_loop_opt (after) 85*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: Phi 86*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: GreaterThanOrEqual 87*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: If 88*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: StaticFieldSet $noinline$testStartBiggerThanEndInt()89*795d594fSAndroid Build Coastguard Worker public static void $noinline$testStartBiggerThanEndInt() { 90*795d594fSAndroid Build Coastguard Worker for (int i = 2; i < 1; i++) { 91*795d594fSAndroid Build Coastguard Worker static_int = 24; 92*795d594fSAndroid Build Coastguard Worker } 93*795d594fSAndroid Build Coastguard Worker } 94*795d594fSAndroid Build Coastguard Worker 95*795d594fSAndroid Build Coastguard Worker // Since the parameters are unknown, we have to keep the loop. 96*795d594fSAndroid Build Coastguard Worker 97*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testUnknownParameterValuesInt(int, int) loop_optimization (before) 98*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 99*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] 100*795d594fSAndroid Build Coastguard Worker 101*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testUnknownParameterValuesInt(int, int) loop_optimization (after) 102*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 103*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] $noinline$testUnknownParameterValuesInt(int start, int end)104*795d594fSAndroid Build Coastguard Worker public static void $noinline$testUnknownParameterValuesInt(int start, int end) { 105*795d594fSAndroid Build Coastguard Worker for (int i = start; i < end; i++) { 106*795d594fSAndroid Build Coastguard Worker static_int = 24; 107*795d594fSAndroid Build Coastguard Worker } 108*795d594fSAndroid Build Coastguard Worker } 109*795d594fSAndroid Build Coastguard Worker $inline$unknownParameterValuesInt(int start, int end)110*795d594fSAndroid Build Coastguard Worker public static void $inline$unknownParameterValuesInt(int start, int end) { 111*795d594fSAndroid Build Coastguard Worker for (int i = start; i < end; i++) { 112*795d594fSAndroid Build Coastguard Worker static_int = 24; 113*795d594fSAndroid Build Coastguard Worker } 114*795d594fSAndroid Build Coastguard Worker } 115*795d594fSAndroid Build Coastguard Worker 116*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesInt() loop_optimization (before) 117*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 118*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] 119*795d594fSAndroid Build Coastguard Worker 120*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesInt() loop_optimization (after) 121*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Const1:i\d+>> IntConstant 1 122*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Const1>>] 123*795d594fSAndroid Build Coastguard Worker 124*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesInt() dead_code_elimination$after_loop_opt (before) 125*795d594fSAndroid Build Coastguard Worker /// CHECK: Phi 126*795d594fSAndroid Build Coastguard Worker /// CHECK: GreaterThanOrEqual 127*795d594fSAndroid Build Coastguard Worker /// CHECK: If 128*795d594fSAndroid Build Coastguard Worker /// CHECK: StaticFieldSet 129*795d594fSAndroid Build Coastguard Worker 130*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesInt() dead_code_elimination$after_loop_opt (after) 131*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: Phi 132*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: GreaterThanOrEqual 133*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: If 134*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: StaticFieldSet $noinline$testKnownParameterValuesInt()135*795d594fSAndroid Build Coastguard Worker public static void $noinline$testKnownParameterValuesInt() { 136*795d594fSAndroid Build Coastguard Worker $inline$unknownParameterValuesInt(10, 1); 137*795d594fSAndroid Build Coastguard Worker } 138*795d594fSAndroid Build Coastguard Worker 139*795d594fSAndroid Build Coastguard Worker // Known limitatation: The loop count calculation would overflow so loop optimization doesn't 140*795d594fSAndroid Build Coastguard Worker // know how many trips there are. 141*795d594fSAndroid Build Coastguard Worker 142*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesInt_WithOverflow() loop_optimization (before) 143*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 144*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] 145*795d594fSAndroid Build Coastguard Worker 146*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesInt_WithOverflow() loop_optimization (after) 147*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 148*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] $noinline$testKnownParameterValuesInt_WithOverflow()149*795d594fSAndroid Build Coastguard Worker public static void $noinline$testKnownParameterValuesInt_WithOverflow() { 150*795d594fSAndroid Build Coastguard Worker $inline$unknownParameterValuesInt(Integer.MAX_VALUE, Integer.MIN_VALUE); 151*795d594fSAndroid Build Coastguard Worker } 152*795d594fSAndroid Build Coastguard Worker 153*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testSameStartEndLong() loop_optimization (before) 154*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 155*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] 156*795d594fSAndroid Build Coastguard Worker 157*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testSameStartEndLong() loop_optimization (after) 158*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Const1:i\d+>> IntConstant 1 159*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Const1>>] 160*795d594fSAndroid Build Coastguard Worker 161*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testSameStartEndLong() dead_code_elimination$after_loop_opt (before) 162*795d594fSAndroid Build Coastguard Worker /// CHECK: Phi 163*795d594fSAndroid Build Coastguard Worker /// CHECK: GreaterThanOrEqual 164*795d594fSAndroid Build Coastguard Worker /// CHECK: If 165*795d594fSAndroid Build Coastguard Worker /// CHECK: StaticFieldSet 166*795d594fSAndroid Build Coastguard Worker 167*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testSameStartEndLong() dead_code_elimination$after_loop_opt (after) 168*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: Phi 169*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: GreaterThanOrEqual 170*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: If 171*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: StaticFieldSet $noinline$testSameStartEndLong()172*795d594fSAndroid Build Coastguard Worker private static void $noinline$testSameStartEndLong() { 173*795d594fSAndroid Build Coastguard Worker for (long i = 2; i < 2; i++) { 174*795d594fSAndroid Build Coastguard Worker static_long = 24; 175*795d594fSAndroid Build Coastguard Worker } 176*795d594fSAndroid Build Coastguard Worker } 177*795d594fSAndroid Build Coastguard Worker 178*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testStartBiggerThanEndLong() loop_optimization (before) 179*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 180*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] 181*795d594fSAndroid Build Coastguard Worker 182*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testStartBiggerThanEndLong() loop_optimization (after) 183*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Const1:i\d+>> IntConstant 1 184*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Const1>>] 185*795d594fSAndroid Build Coastguard Worker 186*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testStartBiggerThanEndLong() dead_code_elimination$after_loop_opt (before) 187*795d594fSAndroid Build Coastguard Worker /// CHECK: Phi 188*795d594fSAndroid Build Coastguard Worker /// CHECK: GreaterThanOrEqual 189*795d594fSAndroid Build Coastguard Worker /// CHECK: If 190*795d594fSAndroid Build Coastguard Worker /// CHECK: StaticFieldSet 191*795d594fSAndroid Build Coastguard Worker 192*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testStartBiggerThanEndLong() dead_code_elimination$after_loop_opt (after) 193*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: Phi 194*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: GreaterThanOrEqual 195*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: If 196*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: StaticFieldSet $noinline$testStartBiggerThanEndLong()197*795d594fSAndroid Build Coastguard Worker public static void $noinline$testStartBiggerThanEndLong() { 198*795d594fSAndroid Build Coastguard Worker for (long i = 2; i < 1; i++) { 199*795d594fSAndroid Build Coastguard Worker static_long = 24; 200*795d594fSAndroid Build Coastguard Worker } 201*795d594fSAndroid Build Coastguard Worker } 202*795d594fSAndroid Build Coastguard Worker 203*795d594fSAndroid Build Coastguard Worker // Since the parameters are unknown, we have to keep the loop. 204*795d594fSAndroid Build Coastguard Worker 205*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testUnknownParameterValuesLong(long, long) loop_optimization (before) 206*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 207*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] 208*795d594fSAndroid Build Coastguard Worker 209*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testUnknownParameterValuesLong(long, long) loop_optimization (after) 210*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 211*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] $noinline$testUnknownParameterValuesLong(long start, long end)212*795d594fSAndroid Build Coastguard Worker public static void $noinline$testUnknownParameterValuesLong(long start, long end) { 213*795d594fSAndroid Build Coastguard Worker for (long i = start; i < end; i++) { 214*795d594fSAndroid Build Coastguard Worker static_long = 24; 215*795d594fSAndroid Build Coastguard Worker } 216*795d594fSAndroid Build Coastguard Worker } 217*795d594fSAndroid Build Coastguard Worker $inline$unknownParameterValuesLong(long start, long end)218*795d594fSAndroid Build Coastguard Worker public static void $inline$unknownParameterValuesLong(long start, long end) { 219*795d594fSAndroid Build Coastguard Worker for (long i = start; i < end; i++) { 220*795d594fSAndroid Build Coastguard Worker static_long = 24; 221*795d594fSAndroid Build Coastguard Worker } 222*795d594fSAndroid Build Coastguard Worker } 223*795d594fSAndroid Build Coastguard Worker 224*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesLong() loop_optimization (before) 225*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 226*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] 227*795d594fSAndroid Build Coastguard Worker 228*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesLong() loop_optimization (after) 229*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Const1:i\d+>> IntConstant 1 230*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Const1>>] 231*795d594fSAndroid Build Coastguard Worker 232*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesLong() dead_code_elimination$after_loop_opt (before) 233*795d594fSAndroid Build Coastguard Worker /// CHECK: Phi 234*795d594fSAndroid Build Coastguard Worker /// CHECK: GreaterThanOrEqual 235*795d594fSAndroid Build Coastguard Worker /// CHECK: If 236*795d594fSAndroid Build Coastguard Worker /// CHECK: StaticFieldSet 237*795d594fSAndroid Build Coastguard Worker 238*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesLong() dead_code_elimination$after_loop_opt (after) 239*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: Phi 240*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: GreaterThanOrEqual 241*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: If 242*795d594fSAndroid Build Coastguard Worker /// CHECK-NOT: StaticFieldSet $noinline$testKnownParameterValuesLong()243*795d594fSAndroid Build Coastguard Worker public static void $noinline$testKnownParameterValuesLong() { 244*795d594fSAndroid Build Coastguard Worker $inline$unknownParameterValuesLong(10L, 1L); 245*795d594fSAndroid Build Coastguard Worker } 246*795d594fSAndroid Build Coastguard Worker 247*795d594fSAndroid Build Coastguard Worker // Known limitatation: The loop count calculation would overflow so loop optimization doesn't 248*795d594fSAndroid Build Coastguard Worker // know how many trips there are. 249*795d594fSAndroid Build Coastguard Worker 250*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesLong_WithOverflow() loop_optimization (before) 251*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 252*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] 253*795d594fSAndroid Build Coastguard Worker 254*795d594fSAndroid Build Coastguard Worker /// CHECK-START: void Main.$noinline$testKnownParameterValuesLong_WithOverflow() loop_optimization (after) 255*795d594fSAndroid Build Coastguard Worker /// CHECK: <<Comp:z\d+>> GreaterThanOrEqual 256*795d594fSAndroid Build Coastguard Worker /// CHECK: If [<<Comp>>] $noinline$testKnownParameterValuesLong_WithOverflow()257*795d594fSAndroid Build Coastguard Worker public static void $noinline$testKnownParameterValuesLong_WithOverflow() { 258*795d594fSAndroid Build Coastguard Worker $inline$unknownParameterValuesLong(Long.MAX_VALUE, Long.MIN_VALUE); 259*795d594fSAndroid Build Coastguard Worker } 260*795d594fSAndroid Build Coastguard Worker assertIntEquals(int expected, int result)261*795d594fSAndroid Build Coastguard Worker public static void assertIntEquals(int expected, int result) { 262*795d594fSAndroid Build Coastguard Worker if (expected != result) { 263*795d594fSAndroid Build Coastguard Worker throw new Error("Expected: " + expected + ", found: " + result); 264*795d594fSAndroid Build Coastguard Worker } 265*795d594fSAndroid Build Coastguard Worker } 266*795d594fSAndroid Build Coastguard Worker assertLongEquals(long expected, long result)267*795d594fSAndroid Build Coastguard Worker public static void assertLongEquals(long expected, long result) { 268*795d594fSAndroid Build Coastguard Worker if (expected != result) { 269*795d594fSAndroid Build Coastguard Worker throw new Error("Expected: " + expected + ", found: " + result); 270*795d594fSAndroid Build Coastguard Worker } 271*795d594fSAndroid Build Coastguard Worker } 272*795d594fSAndroid Build Coastguard Worker } 273