Lines Matching refs:results
167 int[] results = new int[10]; in intOperTest() local
170 results[0] = x + y; in intOperTest()
171 results[1] = x - y; in intOperTest()
172 results[2] = x * y; in intOperTest()
173 results[3] = x * x; in intOperTest()
174 results[4] = x / y; in intOperTest()
175 results[5] = x % -y; in intOperTest()
176 results[6] = x & y; in intOperTest()
177 results[7] = x | y; in intOperTest()
178 results[8] = x ^ y; in intOperTest()
181 results[9] = x + ((((((((x + y) - y) * y) / y) % y) & y) | y) ^ y); in intOperTest()
183 return results; in intOperTest()
185 static void intOperCheck(int[] results) { in intOperCheck() argument
190 int negOne = -results[5]; in intOperCheck()
195 Main.assertTrue(results[0] == 69997); in intOperCheck()
196 Main.assertTrue(results[1] == 70003); in intOperCheck()
197 Main.assertTrue(results[2] == -210000); in intOperCheck()
198 Main.assertTrue(results[3] == 605032704); // overflow / truncate in intOperCheck()
199 Main.assertTrue(results[4] == -23333); in intOperCheck()
200 Main.assertTrue(results[5] == 1); in intOperCheck()
201 Main.assertTrue(results[6] == 70000); in intOperCheck()
202 Main.assertTrue(results[7] == -3); in intOperCheck()
203 Main.assertTrue(results[8] == -70003); in intOperCheck()
204 Main.assertTrue(results[9] == 70000); in intOperCheck()
213 int[] results = new int[8]; in lit16Test() local
216 results[0] = x + 1000; in lit16Test()
217 results[1] = 1000 - x; in lit16Test()
218 results[2] = x * 1000; in lit16Test()
219 results[3] = x / 1000; in lit16Test()
220 results[4] = x % 1000; in lit16Test()
221 results[5] = x & 1000; in lit16Test()
222 results[6] = x | -1000; in lit16Test()
223 results[7] = x ^ -1000; in lit16Test()
224 return results; in lit16Test()
226 static void lit16Check(int[] results) { in lit16Check() argument
227 Main.assertTrue(results[0] == 78777); in lit16Check()
228 Main.assertTrue(results[1] == -76777); in lit16Check()
229 Main.assertTrue(results[2] == 77777000); in lit16Check()
230 Main.assertTrue(results[3] == 77); in lit16Check()
231 Main.assertTrue(results[4] == 777); in lit16Check()
232 Main.assertTrue(results[5] == 960); in lit16Check()
233 Main.assertTrue(results[6] == -39); in lit16Check()
234 Main.assertTrue(results[7] == -76855); in lit16Check()
243 int[] results = new int[8]; in lit8Test() local
246 results[0] = x + 10; in lit8Test()
247 results[1] = 10 - x; in lit8Test()
248 results[2] = x * 10; in lit8Test()
249 results[3] = x / 10; in lit8Test()
250 results[4] = x % 10; in lit8Test()
251 results[5] = x & 10; in lit8Test()
252 results[6] = x | -10; in lit8Test()
253 results[7] = x ^ -10; in lit8Test()
254 return results; in lit8Test()
256 static void lit8Check(int[] results) { in lit8Check() argument
265 Main.assertTrue(results[0] == -55545); in lit8Check()
266 Main.assertTrue(results[1] == 55565); in lit8Check()
267 Main.assertTrue(results[2] == -555550); in lit8Check()
268 Main.assertTrue(results[3] == -5555); in lit8Check()
269 Main.assertTrue(results[4] == -5); in lit8Check()
270 Main.assertTrue(results[5] == 8); in lit8Check()
271 Main.assertTrue(results[6] == -1); in lit8Check()
272 Main.assertTrue(results[7] == 55563); in lit8Check()
356 int results[] = new int[4]; in intShiftTest() local
358 results[0] = value << dist; in intShiftTest()
359 results[1] = value >> dist; in intShiftTest()
360 results[2] = value >>> dist; in intShiftTest()
362 results[3] = (((value << dist) >> dist) >>> dist) << dist; in intShiftTest()
363 return results; in intShiftTest()
365 static void intShiftCheck(int[] results) { in intShiftCheck() argument
368 Main.assertTrue(results[0] == 0x00aa0100); in intShiftCheck()
369 Main.assertTrue(results[1] == 0xffff00aa); in intShiftCheck()
370 Main.assertTrue(results[2] == 0x00ff00aa); in intShiftCheck()
371 Main.assertTrue(results[3] == 0xaa00); in intShiftCheck()
381 long[] results = new long[10]; in longOperTest() local
384 results[0] = x + y; in longOperTest()
385 results[1] = x - y; in longOperTest()
386 results[2] = x * y; in longOperTest()
387 results[3] = x * x; in longOperTest()
388 results[4] = x / y; in longOperTest()
389 results[5] = x % -y; in longOperTest()
390 results[6] = x & y; in longOperTest()
391 results[7] = x | y; in longOperTest()
392 results[8] = x ^ y; in longOperTest()
395 results[9] = x + ((((((((x + y) - y) * y) / y) % y) & y) | y) ^ y); in longOperTest()
397 return results; in longOperTest()
399 static void longOperCheck(long[] results) { in longOperCheck() argument
404 long negOne = -results[5]; in longOperCheck()
409 Main.assertTrue(results[0] == 69999999997L); in longOperCheck()
410 Main.assertTrue(results[1] == 70000000003L); in longOperCheck()
411 Main.assertTrue(results[2] == -210000000000L); in longOperCheck()
412 Main.assertTrue(results[3] == -6833923606740729856L); // overflow in longOperCheck()
413 Main.assertTrue(results[4] == -23333333333L); in longOperCheck()
414 Main.assertTrue(results[5] == 1); in longOperCheck()
415 Main.assertTrue(results[6] == 70000000000L); in longOperCheck()
416 Main.assertTrue(results[7] == -3); in longOperCheck()
417 Main.assertTrue(results[8] == -70000000003L); in longOperCheck()
418 Main.assertTrue(results[9] == 70000000000L); in longOperCheck()
420 Main.assertTrue(results.length == 10); in longOperCheck()
429 long results[] = new long[4]; in longShiftTest() local
431 results[0] = value << dist; in longShiftTest()
432 results[1] = value >> dist; in longShiftTest()
433 results[2] = value >>> dist; in longShiftTest()
435 results[3] = (((value << dist) >> dist) >>> dist) << dist; in longShiftTest()
436 return results; in longShiftTest()
438 static long longShiftCheck(long[] results) { in longShiftCheck() argument
441 Main.assertTrue(results[0] == 0x96deff00aa010000L); in longShiftCheck()
442 Main.assertTrue(results[1] == 0xffffd5aa96deff00L); in longShiftCheck()
443 Main.assertTrue(results[2] == 0x0000d5aa96deff00L); in longShiftCheck()
444 Main.assertTrue(results[3] == 0xffff96deff000000L); in longShiftCheck()
446 Main.assertTrue(results.length == 4); in longShiftCheck()
448 return results[0]; // test return-long in longShiftCheck()