001/* 002 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 004 * 005 * This code is free software; you can redistribute it and/or modify it 006 * under the terms of the GNU General Public License version 2 only, as 007 * published by the Free Software Foundation. 008 * 009 * This code is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 011 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 012 * version 2 for more details (a copy is included in the LICENSE file that 013 * accompanied this code). 014 * 015 * You should have received a copy of the GNU General Public License version 016 * 2 along with this work; if not, write to the Free Software Foundation, 017 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 018 * 019 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 020 * or visit www.oracle.com if you need additional information or have any 021 * questions. 022 */ 023package com.oracle.graal.compiler.test; 024 025import jdk.internal.jvmci.code.*; 026import jdk.internal.jvmci.meta.*; 027 028import org.junit.*; 029 030import com.oracle.graal.nodes.*; 031 032public class MemoryArithmeticTest extends GraalCompilerTest { 033 034 @Override 035 protected InstalledCode getCode(ResolvedJavaMethod method, StructuredGraph graph) { 036 return getCode(method, graph, true); 037 } 038 039 /** 040 * Called before a test is executed. 041 */ 042 @Override 043 protected void before(ResolvedJavaMethod method) { 044 // don't let any null exception tracking change the generated code. 045 method.reprofile(); 046 } 047 048 /** 049 * A dummy field used by some tests to create side effects. 050 */ 051 protected static int count; 052 053 static class FieldObject { 054 boolean booleanValue; 055 byte byteValue; 056 short shortValue; 057 char charValue; 058 int intValue; 059 float floatValue; 060 long longValue; 061 double doubleValue; 062 Object objectValue; 063 } 064 065 static FieldObject maxObject = new FieldObject(); 066 static FieldObject minObject; 067 068 static final boolean booleanTestValue1 = false; 069 static final byte byteTestValue1 = 0; 070 static final short shortTestValue1 = 0; 071 static final char charTestValue1 = 0; 072 static final int intTestValue1 = 0; 073 static final float floatTestValue1 = 0; 074 static final long longTestValue1 = 0; 075 static final double doubleTestValue1 = 0; 076 static final Object objectTestValue1 = null; 077 078 static final boolean booleanTestValue2 = true; 079 static final byte byteTestValue2 = Byte.MAX_VALUE; 080 static final short shortTestValue2 = Short.MAX_VALUE; 081 static final char charTestValue2 = Character.MAX_VALUE; 082 static final int intTestValue2 = Integer.MAX_VALUE; 083 static final float floatTestValue2 = Float.MAX_VALUE; 084 static final long longTestValue2 = Long.MAX_VALUE; 085 static final double doubleTestValue2 = Double.MAX_VALUE; 086 static final Object objectTestValue2 = "String"; 087 088 static { 089 maxObject.booleanValue = true; 090 maxObject.byteValue = Byte.MAX_VALUE; 091 maxObject.shortValue = Short.MAX_VALUE; 092 maxObject.charValue = Character.MAX_VALUE; 093 maxObject.intValue = Integer.MAX_VALUE; 094 maxObject.floatValue = Float.MAX_VALUE; 095 maxObject.longValue = Long.MAX_VALUE; 096 maxObject.doubleValue = Double.MAX_VALUE; 097 maxObject.objectValue = "String"; 098 } 099 100 public static Object testBooleanCompare(FieldObject f, boolean booleanValue) { 101 if (f.booleanValue == booleanValue) { 102 return f; 103 } 104 return null; 105 } 106 107 public static Object testBooleanCompareConstant1(FieldObject f) { 108 if (f.booleanValue == booleanTestValue1) { 109 return f; 110 } 111 return null; 112 } 113 114 public static Object testBooleanCompareConstant2(FieldObject f) { 115 if (f.booleanValue == booleanTestValue2) { 116 return f; 117 } 118 return null; 119 } 120 121 @Test 122 public void testBooleanCompares() { 123 FieldObject f = new FieldObject(); 124 test("testBooleanCompare", f, booleanTestValue1); 125 test("testBooleanCompareConstant1", f); 126 test("testBooleanCompareConstant2", f); 127 } 128 129 @Test 130 public void testBooleanNullCompares() { 131 test("testBooleanCompare", null, booleanTestValue1); 132 } 133 134 @Test 135 public void testBooleanNullCompares1() { 136 test("testBooleanCompareConstant1", (Object) null); 137 } 138 139 @Test 140 public void testBooleanNullCompares2() { 141 test("testBooleanCompareConstant2", (Object) null); 142 } 143 144 public static Object testByteCompare(FieldObject f, byte byteValue) { 145 if (f.byteValue == byteValue) { 146 return f; 147 } 148 return null; 149 } 150 151 public static Object testByteCompareConstant1(FieldObject f) { 152 if (f.byteValue == byteTestValue1) { 153 return f; 154 } 155 return null; 156 } 157 158 public static Object testByteCompareConstant2(FieldObject f) { 159 if (f.byteValue == byteTestValue2) { 160 return f; 161 } 162 return null; 163 } 164 165 @Test 166 public void testByteCompares() { 167 FieldObject f = new FieldObject(); 168 test("testByteCompare", f, byteTestValue1); 169 test("testByteCompareConstant1", f); 170 test("testByteCompareConstant2", f); 171 } 172 173 @Test 174 public void testByteNullCompares() { 175 test("testByteCompare", null, byteTestValue1); 176 } 177 178 @Test 179 public void testByteNullCompares1() { 180 test("testByteCompareConstant1", (Object) null); 181 } 182 183 @Test 184 public void testByteNullCompares2() { 185 test("testByteCompareConstant2", (Object) null); 186 } 187 188 public static Object testByteCompareLess(FieldObject f, byte byteValue) { 189 if (f.byteValue < byteValue) { 190 return f; 191 } 192 return null; 193 } 194 195 public static Object testByteCompareLessConstant1(FieldObject f) { 196 if (f.byteValue < byteTestValue1) { 197 return f; 198 } 199 return null; 200 } 201 202 public static Object testByteCompareLessConstant2(FieldObject f) { 203 if (f.byteValue < byteTestValue2) { 204 return f; 205 } 206 return null; 207 } 208 209 @Test 210 public void testByteComparesLess() { 211 FieldObject f = new FieldObject(); 212 test("testByteCompareLess", f, byteTestValue1); 213 test("testByteCompareLessConstant1", f); 214 test("testByteCompareLessConstant2", f); 215 } 216 217 @Test 218 public void testByteNullComparesLess() { 219 test("testByteCompareLess", null, byteTestValue1); 220 } 221 222 @Test 223 public void testByteNullComparesLess1() { 224 test("testByteCompareLessConstant1", (Object) null); 225 } 226 227 @Test 228 public void testByteNullComparesLess2() { 229 test("testByteCompareLessConstant2", (Object) null); 230 } 231 232 public static Object testByteSwappedCompareLess(FieldObject f, byte byteValue) { 233 if (byteValue < f.byteValue) { 234 return f; 235 } 236 return null; 237 } 238 239 public static Object testByteSwappedCompareLessConstant1(FieldObject f) { 240 if (byteTestValue1 < f.byteValue) { 241 return f; 242 } 243 return null; 244 } 245 246 public static Object testByteSwappedCompareLessConstant2(FieldObject f) { 247 if (byteTestValue2 < f.byteValue) { 248 return f; 249 } 250 return null; 251 } 252 253 @Test 254 public void testByteSwappedComparesLess() { 255 FieldObject f = new FieldObject(); 256 test("testByteSwappedCompareLess", f, byteTestValue1); 257 test("testByteSwappedCompareLessConstant1", f); 258 test("testByteSwappedCompareLessConstant2", f); 259 } 260 261 @Test 262 public void testByteNullSwappedComparesLess() { 263 test("testByteSwappedCompareLess", null, byteTestValue1); 264 } 265 266 @Test 267 public void testByteNullSwappedComparesLess1() { 268 test("testByteSwappedCompareLessConstant1", (Object) null); 269 } 270 271 @Test 272 public void testByteNullSwappedComparesLess2() { 273 test("testByteSwappedCompareLessConstant2", (Object) null); 274 } 275 276 public static Object testByteCompareLessEqual(FieldObject f, byte byteValue) { 277 if (f.byteValue <= byteValue) { 278 return f; 279 } 280 return null; 281 } 282 283 public static Object testByteCompareLessEqualConstant1(FieldObject f) { 284 if (f.byteValue <= byteTestValue1) { 285 return f; 286 } 287 return null; 288 } 289 290 public static Object testByteCompareLessEqualConstant2(FieldObject f) { 291 if (f.byteValue <= byteTestValue2) { 292 return f; 293 } 294 return null; 295 } 296 297 @Test 298 public void testByteComparesLessEqual() { 299 FieldObject f = new FieldObject(); 300 test("testByteCompareLessEqual", f, byteTestValue1); 301 test("testByteCompareLessEqualConstant1", f); 302 test("testByteCompareLessEqualConstant2", f); 303 } 304 305 @Test 306 public void testByteNullComparesLessEqual() { 307 test("testByteCompareLessEqual", null, byteTestValue1); 308 } 309 310 @Test 311 public void testByteNullComparesLessEqual1() { 312 test("testByteCompareLessEqualConstant1", (Object) null); 313 } 314 315 @Test 316 public void testByteNullComparesLessEqual2() { 317 test("testByteCompareLessEqualConstant2", (Object) null); 318 } 319 320 public static Object testByteSwappedCompareLessEqual(FieldObject f, byte byteValue) { 321 if (byteValue <= f.byteValue) { 322 return f; 323 } 324 return null; 325 } 326 327 public static Object testByteSwappedCompareLessEqualConstant1(FieldObject f) { 328 if (byteTestValue1 <= f.byteValue) { 329 return f; 330 } 331 return null; 332 } 333 334 public static Object testByteSwappedCompareLessEqualConstant2(FieldObject f) { 335 if (byteTestValue2 <= f.byteValue) { 336 return f; 337 } 338 return null; 339 } 340 341 @Test 342 public void testByteSwappedComparesLessEqual() { 343 FieldObject f = new FieldObject(); 344 test("testByteSwappedCompareLessEqual", f, byteTestValue1); 345 test("testByteSwappedCompareLessEqualConstant1", f); 346 test("testByteSwappedCompareLessEqualConstant2", f); 347 } 348 349 @Test 350 public void testByteNullSwappedComparesLessEqual() { 351 test("testByteSwappedCompareLessEqual", null, byteTestValue1); 352 } 353 354 @Test 355 public void testByteNullSwappedComparesLessEqual1() { 356 test("testByteSwappedCompareLessEqualConstant1", (Object) null); 357 } 358 359 @Test 360 public void testByteNullSwappedComparesLessEqual2() { 361 test("testByteSwappedCompareLessEqualConstant2", (Object) null); 362 } 363 364 public static Object testByteCompareGreater(FieldObject f, byte byteValue) { 365 if (f.byteValue > byteValue) { 366 return f; 367 } 368 return null; 369 } 370 371 public static Object testByteCompareGreaterConstant1(FieldObject f) { 372 if (f.byteValue > byteTestValue1) { 373 return f; 374 } 375 return null; 376 } 377 378 public static Object testByteCompareGreaterConstant2(FieldObject f) { 379 if (f.byteValue > byteTestValue2) { 380 return f; 381 } 382 return null; 383 } 384 385 @Test 386 public void testByteComparesGreater() { 387 FieldObject f = new FieldObject(); 388 test("testByteCompareGreater", f, byteTestValue1); 389 test("testByteCompareGreaterConstant1", f); 390 test("testByteCompareGreaterConstant2", f); 391 } 392 393 @Test 394 public void testByteNullComparesGreater() { 395 test("testByteCompareGreater", null, byteTestValue1); 396 } 397 398 @Test 399 public void testByteNullComparesGreater1() { 400 test("testByteCompareGreaterConstant1", (Object) null); 401 } 402 403 @Test 404 public void testByteNullComparesGreater2() { 405 test("testByteCompareGreaterConstant2", (Object) null); 406 } 407 408 public static Object testByteSwappedCompareGreater(FieldObject f, byte byteValue) { 409 if (byteValue > f.byteValue) { 410 return f; 411 } 412 return null; 413 } 414 415 public static Object testByteSwappedCompareGreaterConstant1(FieldObject f) { 416 if (byteTestValue1 > f.byteValue) { 417 return f; 418 } 419 return null; 420 } 421 422 public static Object testByteSwappedCompareGreaterConstant2(FieldObject f) { 423 if (byteTestValue2 > f.byteValue) { 424 return f; 425 } 426 return null; 427 } 428 429 @Test 430 public void testByteSwappedComparesGreater() { 431 FieldObject f = new FieldObject(); 432 test("testByteSwappedCompareGreater", f, byteTestValue1); 433 test("testByteSwappedCompareGreaterConstant1", f); 434 test("testByteSwappedCompareGreaterConstant2", f); 435 } 436 437 @Test 438 public void testByteNullSwappedComparesGreater() { 439 test("testByteSwappedCompareGreater", null, byteTestValue1); 440 } 441 442 @Test 443 public void testByteNullSwappedComparesGreater1() { 444 test("testByteSwappedCompareGreaterConstant1", (Object) null); 445 } 446 447 @Test 448 public void testByteNullSwappedComparesGreater2() { 449 test("testByteSwappedCompareGreaterConstant2", (Object) null); 450 } 451 452 public static Object testByteCompareGreaterEqual(FieldObject f, byte byteValue) { 453 if (f.byteValue >= byteValue) { 454 return f; 455 } 456 return null; 457 } 458 459 public static Object testByteCompareGreaterEqualConstant1(FieldObject f) { 460 if (f.byteValue >= byteTestValue1) { 461 return f; 462 } 463 return null; 464 } 465 466 public static Object testByteCompareGreaterEqualConstant2(FieldObject f) { 467 if (f.byteValue >= byteTestValue2) { 468 return f; 469 } 470 return null; 471 } 472 473 @Test 474 public void testByteComparesGreaterEqual() { 475 FieldObject f = new FieldObject(); 476 test("testByteCompareGreaterEqual", f, byteTestValue1); 477 test("testByteCompareGreaterEqualConstant1", f); 478 test("testByteCompareGreaterEqualConstant2", f); 479 } 480 481 @Test 482 public void testByteNullComparesGreaterEqual() { 483 test("testByteCompareGreaterEqual", null, byteTestValue1); 484 } 485 486 @Test 487 public void testByteNullComparesGreaterEqual1() { 488 test("testByteCompareGreaterEqualConstant1", (Object) null); 489 } 490 491 @Test 492 public void testByteNullComparesGreaterEqual2() { 493 test("testByteCompareGreaterEqualConstant2", (Object) null); 494 } 495 496 public static Object testByteSwappedCompareGreaterEqual(FieldObject f, byte byteValue) { 497 if (byteValue >= f.byteValue) { 498 return f; 499 } 500 return null; 501 } 502 503 public static Object testByteSwappedCompareGreaterEqualConstant1(FieldObject f) { 504 if (byteTestValue1 >= f.byteValue) { 505 return f; 506 } 507 return null; 508 } 509 510 public static Object testByteSwappedCompareGreaterEqualConstant2(FieldObject f) { 511 if (byteTestValue2 >= f.byteValue) { 512 return f; 513 } 514 return null; 515 } 516 517 @Test 518 public void testByteSwappedComparesGreaterEqual() { 519 FieldObject f = new FieldObject(); 520 test("testByteSwappedCompareGreaterEqual", f, byteTestValue1); 521 test("testByteSwappedCompareGreaterEqualConstant1", f); 522 test("testByteSwappedCompareGreaterEqualConstant2", f); 523 } 524 525 @Test 526 public void testByteNullSwappedComparesGreaterEqual() { 527 test("testByteSwappedCompareGreaterEqual", null, byteTestValue1); 528 } 529 530 @Test 531 public void testByteNullSwappedComparesGreaterEqual1() { 532 test("testByteSwappedCompareGreaterEqualConstant1", (Object) null); 533 } 534 535 @Test 536 public void testByteNullSwappedComparesGreaterEqual2() { 537 test("testByteSwappedCompareGreaterEqualConstant2", (Object) null); 538 } 539 540 public static Object testShortCompare(FieldObject f, short shortValue) { 541 if (f.shortValue == shortValue) { 542 return f; 543 } 544 return null; 545 } 546 547 public static Object testShortCompareConstant1(FieldObject f) { 548 if (f.shortValue == shortTestValue1) { 549 return f; 550 } 551 return null; 552 } 553 554 public static Object testShortCompareConstant2(FieldObject f) { 555 if (f.shortValue == shortTestValue2) { 556 return f; 557 } 558 return null; 559 } 560 561 @Test 562 public void testShortCompares() { 563 FieldObject f = new FieldObject(); 564 test("testShortCompare", f, shortTestValue1); 565 test("testShortCompareConstant1", f); 566 test("testShortCompareConstant2", f); 567 } 568 569 @Test 570 public void testShortNullCompares() { 571 test("testShortCompare", null, shortTestValue1); 572 } 573 574 @Test 575 public void testShortNullCompares1() { 576 test("testShortCompareConstant1", (Object) null); 577 } 578 579 @Test 580 public void testShortNullCompares2() { 581 test("testShortCompareConstant2", (Object) null); 582 } 583 584 public static Object testShortCompareLess(FieldObject f, short shortValue) { 585 if (f.shortValue < shortValue) { 586 return f; 587 } 588 return null; 589 } 590 591 public static Object testShortCompareLessConstant1(FieldObject f) { 592 if (f.shortValue < shortTestValue1) { 593 return f; 594 } 595 return null; 596 } 597 598 public static Object testShortCompareLessConstant2(FieldObject f) { 599 if (f.shortValue < shortTestValue2) { 600 return f; 601 } 602 return null; 603 } 604 605 @Test 606 public void testShortComparesLess() { 607 FieldObject f = new FieldObject(); 608 test("testShortCompareLess", f, shortTestValue1); 609 test("testShortCompareLessConstant1", f); 610 test("testShortCompareLessConstant2", f); 611 } 612 613 @Test 614 public void testShortNullComparesLess() { 615 test("testShortCompareLess", null, shortTestValue1); 616 } 617 618 @Test 619 public void testShortNullComparesLess1() { 620 test("testShortCompareLessConstant1", (Object) null); 621 } 622 623 @Test 624 public void testShortNullComparesLess2() { 625 test("testShortCompareLessConstant2", (Object) null); 626 } 627 628 public static Object testShortSwappedCompareLess(FieldObject f, short shortValue) { 629 if (shortValue < f.shortValue) { 630 return f; 631 } 632 return null; 633 } 634 635 public static Object testShortSwappedCompareLessConstant1(FieldObject f) { 636 if (shortTestValue1 < f.shortValue) { 637 return f; 638 } 639 return null; 640 } 641 642 public static Object testShortSwappedCompareLessConstant2(FieldObject f) { 643 if (shortTestValue2 < f.shortValue) { 644 return f; 645 } 646 return null; 647 } 648 649 @Test 650 public void testShortSwappedComparesLess() { 651 FieldObject f = new FieldObject(); 652 test("testShortSwappedCompareLess", f, shortTestValue1); 653 test("testShortSwappedCompareLessConstant1", f); 654 test("testShortSwappedCompareLessConstant2", f); 655 } 656 657 @Test 658 public void testShortNullSwappedComparesLess() { 659 test("testShortSwappedCompareLess", null, shortTestValue1); 660 } 661 662 @Test 663 public void testShortNullSwappedComparesLess1() { 664 test("testShortSwappedCompareLessConstant1", (Object) null); 665 } 666 667 @Test 668 public void testShortNullSwappedComparesLess2() { 669 test("testShortSwappedCompareLessConstant2", (Object) null); 670 } 671 672 public static Object testShortCompareLessEqual(FieldObject f, short shortValue) { 673 if (f.shortValue <= shortValue) { 674 return f; 675 } 676 return null; 677 } 678 679 public static Object testShortCompareLessEqualConstant1(FieldObject f) { 680 if (f.shortValue <= shortTestValue1) { 681 return f; 682 } 683 return null; 684 } 685 686 public static Object testShortCompareLessEqualConstant2(FieldObject f) { 687 if (f.shortValue <= shortTestValue2) { 688 return f; 689 } 690 return null; 691 } 692 693 @Test 694 public void testShortComparesLessEqual() { 695 FieldObject f = new FieldObject(); 696 test("testShortCompareLessEqual", f, shortTestValue1); 697 test("testShortCompareLessEqualConstant1", f); 698 test("testShortCompareLessEqualConstant2", f); 699 } 700 701 @Test 702 public void testShortNullComparesLessEqual() { 703 test("testShortCompareLessEqual", null, shortTestValue1); 704 } 705 706 @Test 707 public void testShortNullComparesLessEqual1() { 708 test("testShortCompareLessEqualConstant1", (Object) null); 709 } 710 711 @Test 712 public void testShortNullComparesLessEqual2() { 713 test("testShortCompareLessEqualConstant2", (Object) null); 714 } 715 716 public static Object testShortSwappedCompareLessEqual(FieldObject f, short shortValue) { 717 if (shortValue <= f.shortValue) { 718 return f; 719 } 720 return null; 721 } 722 723 public static Object testShortSwappedCompareLessEqualConstant1(FieldObject f) { 724 if (shortTestValue1 <= f.shortValue) { 725 return f; 726 } 727 return null; 728 } 729 730 public static Object testShortSwappedCompareLessEqualConstant2(FieldObject f) { 731 if (shortTestValue2 <= f.shortValue) { 732 return f; 733 } 734 return null; 735 } 736 737 @Test 738 public void testShortSwappedComparesLessEqual() { 739 FieldObject f = new FieldObject(); 740 test("testShortSwappedCompareLessEqual", f, shortTestValue1); 741 test("testShortSwappedCompareLessEqualConstant1", f); 742 test("testShortSwappedCompareLessEqualConstant2", f); 743 } 744 745 @Test 746 public void testShortNullSwappedComparesLessEqual() { 747 test("testShortSwappedCompareLessEqual", null, shortTestValue1); 748 } 749 750 @Test 751 public void testShortNullSwappedComparesLessEqual1() { 752 test("testShortSwappedCompareLessEqualConstant1", (Object) null); 753 } 754 755 @Test 756 public void testShortNullSwappedComparesLessEqual2() { 757 test("testShortSwappedCompareLessEqualConstant2", (Object) null); 758 } 759 760 public static Object testShortCompareGreater(FieldObject f, short shortValue) { 761 if (f.shortValue > shortValue) { 762 return f; 763 } 764 return null; 765 } 766 767 public static Object testShortCompareGreaterConstant1(FieldObject f) { 768 if (f.shortValue > shortTestValue1) { 769 return f; 770 } 771 return null; 772 } 773 774 public static Object testShortCompareGreaterConstant2(FieldObject f) { 775 if (f.shortValue > shortTestValue2) { 776 return f; 777 } 778 return null; 779 } 780 781 @Test 782 public void testShortComparesGreater() { 783 FieldObject f = new FieldObject(); 784 test("testShortCompareGreater", f, shortTestValue1); 785 test("testShortCompareGreaterConstant1", f); 786 test("testShortCompareGreaterConstant2", f); 787 } 788 789 @Test 790 public void testShortNullComparesGreater() { 791 test("testShortCompareGreater", null, shortTestValue1); 792 } 793 794 @Test 795 public void testShortNullComparesGreater1() { 796 test("testShortCompareGreaterConstant1", (Object) null); 797 } 798 799 @Test 800 public void testShortNullComparesGreater2() { 801 test("testShortCompareGreaterConstant2", (Object) null); 802 } 803 804 public static Object testShortSwappedCompareGreater(FieldObject f, short shortValue) { 805 if (shortValue > f.shortValue) { 806 return f; 807 } 808 return null; 809 } 810 811 public static Object testShortSwappedCompareGreaterConstant1(FieldObject f) { 812 if (shortTestValue1 > f.shortValue) { 813 return f; 814 } 815 return null; 816 } 817 818 public static Object testShortSwappedCompareGreaterConstant2(FieldObject f) { 819 if (shortTestValue2 > f.shortValue) { 820 return f; 821 } 822 return null; 823 } 824 825 @Test 826 public void testShortSwappedComparesGreater() { 827 FieldObject f = new FieldObject(); 828 test("testShortSwappedCompareGreater", f, shortTestValue1); 829 test("testShortSwappedCompareGreaterConstant1", f); 830 test("testShortSwappedCompareGreaterConstant2", f); 831 } 832 833 @Test 834 public void testShortNullSwappedComparesGreater() { 835 test("testShortSwappedCompareGreater", null, shortTestValue1); 836 } 837 838 @Test 839 public void testShortNullSwappedComparesGreater1() { 840 test("testShortSwappedCompareGreaterConstant1", (Object) null); 841 } 842 843 @Test 844 public void testShortNullSwappedComparesGreater2() { 845 test("testShortSwappedCompareGreaterConstant2", (Object) null); 846 } 847 848 public static Object testShortCompareGreaterEqual(FieldObject f, short shortValue) { 849 if (f.shortValue >= shortValue) { 850 return f; 851 } 852 return null; 853 } 854 855 public static Object testShortCompareGreaterEqualConstant1(FieldObject f) { 856 if (f.shortValue >= shortTestValue1) { 857 return f; 858 } 859 return null; 860 } 861 862 public static Object testShortCompareGreaterEqualConstant2(FieldObject f) { 863 if (f.shortValue >= shortTestValue2) { 864 return f; 865 } 866 return null; 867 } 868 869 @Test 870 public void testShortComparesGreaterEqual() { 871 FieldObject f = new FieldObject(); 872 test("testShortCompareGreaterEqual", f, shortTestValue1); 873 test("testShortCompareGreaterEqualConstant1", f); 874 test("testShortCompareGreaterEqualConstant2", f); 875 } 876 877 @Test 878 public void testShortNullComparesGreaterEqual() { 879 test("testShortCompareGreaterEqual", null, shortTestValue1); 880 } 881 882 @Test 883 public void testShortNullComparesGreaterEqual1() { 884 test("testShortCompareGreaterEqualConstant1", (Object) null); 885 } 886 887 @Test 888 public void testShortNullComparesGreaterEqual2() { 889 test("testShortCompareGreaterEqualConstant2", (Object) null); 890 } 891 892 public static Object testShortSwappedCompareGreaterEqual(FieldObject f, short shortValue) { 893 if (shortValue >= f.shortValue) { 894 return f; 895 } 896 return null; 897 } 898 899 public static Object testShortSwappedCompareGreaterEqualConstant1(FieldObject f) { 900 if (shortTestValue1 >= f.shortValue) { 901 return f; 902 } 903 return null; 904 } 905 906 public static Object testShortSwappedCompareGreaterEqualConstant2(FieldObject f) { 907 if (shortTestValue2 >= f.shortValue) { 908 return f; 909 } 910 return null; 911 } 912 913 @Test 914 public void testShortSwappedComparesGreaterEqual() { 915 FieldObject f = new FieldObject(); 916 test("testShortSwappedCompareGreaterEqual", f, shortTestValue1); 917 test("testShortSwappedCompareGreaterEqualConstant1", f); 918 test("testShortSwappedCompareGreaterEqualConstant2", f); 919 } 920 921 @Test 922 public void testShortNullSwappedComparesGreaterEqual() { 923 test("testShortSwappedCompareGreaterEqual", null, shortTestValue1); 924 } 925 926 @Test 927 public void testShortNullSwappedComparesGreaterEqual1() { 928 test("testShortSwappedCompareGreaterEqualConstant1", (Object) null); 929 } 930 931 @Test 932 public void testShortNullSwappedComparesGreaterEqual2() { 933 test("testShortSwappedCompareGreaterEqualConstant2", (Object) null); 934 } 935 936 public static Object testCharCompare(FieldObject f, char charValue) { 937 if (f.charValue == charValue) { 938 return f; 939 } 940 return null; 941 } 942 943 public static Object testCharCompareConstant1(FieldObject f) { 944 if (f.charValue == charTestValue1) { 945 return f; 946 } 947 return null; 948 } 949 950 public static Object testCharCompareConstant2(FieldObject f) { 951 if (f.charValue == charTestValue2) { 952 return f; 953 } 954 return null; 955 } 956 957 @Test 958 public void testCharCompares() { 959 FieldObject f = new FieldObject(); 960 test("testCharCompare", f, charTestValue1); 961 test("testCharCompareConstant1", f); 962 test("testCharCompareConstant2", f); 963 } 964 965 @Test 966 public void testCharNullCompares() { 967 test("testCharCompare", null, charTestValue1); 968 } 969 970 @Test 971 public void testCharNullCompares1() { 972 test("testCharCompareConstant1", (Object) null); 973 } 974 975 @Test 976 public void testCharNullCompares2() { 977 test("testCharCompareConstant2", (Object) null); 978 } 979 980 public static Object testCharCompareLess(FieldObject f, char charValue) { 981 if (f.charValue < charValue) { 982 return f; 983 } 984 return null; 985 } 986 987 public static Object testCharCompareLessConstant1(FieldObject f) { 988 if (f.charValue < charTestValue1) { 989 return f; 990 } 991 return null; 992 } 993 994 public static Object testCharCompareLessConstant2(FieldObject f) { 995 if (f.charValue < charTestValue2) { 996 return f; 997 } 998 return null; 999 } 1000 1001 @Test 1002 public void testCharComparesLess() { 1003 FieldObject f = new FieldObject(); 1004 test("testCharCompareLess", f, charTestValue1); 1005 test("testCharCompareLessConstant1", f); 1006 test("testCharCompareLessConstant2", f); 1007 } 1008 1009 @Test 1010 public void testCharNullComparesLess() { 1011 test("testCharCompareLess", null, charTestValue1); 1012 } 1013 1014 @Test 1015 public void testCharNullComparesLess1() { 1016 test("testCharCompareLessConstant1", (Object) null); 1017 } 1018 1019 @Test 1020 public void testCharNullComparesLess2() { 1021 test("testCharCompareLessConstant2", (Object) null); 1022 } 1023 1024 public static Object testCharSwappedCompareLess(FieldObject f, char charValue) { 1025 if (charValue < f.charValue) { 1026 return f; 1027 } 1028 return null; 1029 } 1030 1031 public static Object testCharSwappedCompareLessConstant1(FieldObject f) { 1032 if (charTestValue1 < f.charValue) { 1033 return f; 1034 } 1035 return null; 1036 } 1037 1038 public static Object testCharSwappedCompareLessConstant2(FieldObject f) { 1039 if (charTestValue2 < f.charValue) { 1040 return f; 1041 } 1042 return null; 1043 } 1044 1045 @Test 1046 public void testCharSwappedComparesLess() { 1047 FieldObject f = new FieldObject(); 1048 test("testCharSwappedCompareLess", f, charTestValue1); 1049 test("testCharSwappedCompareLessConstant1", f); 1050 test("testCharSwappedCompareLessConstant2", f); 1051 } 1052 1053 @Test 1054 public void testCharNullSwappedComparesLess() { 1055 test("testCharSwappedCompareLess", null, charTestValue1); 1056 } 1057 1058 @Test 1059 public void testCharNullSwappedComparesLess1() { 1060 test("testCharSwappedCompareLessConstant1", (Object) null); 1061 } 1062 1063 @Test 1064 public void testCharNullSwappedComparesLess2() { 1065 test("testCharSwappedCompareLessConstant2", (Object) null); 1066 } 1067 1068 public static Object testCharCompareLessEqual(FieldObject f, char charValue) { 1069 if (f.charValue <= charValue) { 1070 return f; 1071 } 1072 return null; 1073 } 1074 1075 public static Object testCharCompareLessEqualConstant1(FieldObject f) { 1076 if (f.charValue <= charTestValue1) { 1077 return f; 1078 } 1079 return null; 1080 } 1081 1082 public static Object testCharCompareLessEqualConstant2(FieldObject f) { 1083 if (f.charValue <= charTestValue2) { 1084 return f; 1085 } 1086 return null; 1087 } 1088 1089 @Test 1090 public void testCharComparesLessEqual() { 1091 FieldObject f = new FieldObject(); 1092 test("testCharCompareLessEqual", f, charTestValue1); 1093 test("testCharCompareLessEqualConstant1", f); 1094 test("testCharCompareLessEqualConstant2", f); 1095 } 1096 1097 @Test 1098 public void testCharNullComparesLessEqual() { 1099 test("testCharCompareLessEqual", null, charTestValue1); 1100 } 1101 1102 @Test 1103 public void testCharNullComparesLessEqual1() { 1104 test("testCharCompareLessEqualConstant1", (Object) null); 1105 } 1106 1107 @Test 1108 public void testCharNullComparesLessEqual2() { 1109 test("testCharCompareLessEqualConstant2", (Object) null); 1110 } 1111 1112 public static Object testCharSwappedCompareLessEqual(FieldObject f, char charValue) { 1113 if (charValue <= f.charValue) { 1114 return f; 1115 } 1116 return null; 1117 } 1118 1119 public static Object testCharSwappedCompareLessEqualConstant1(FieldObject f) { 1120 if (charTestValue1 <= f.charValue) { 1121 return f; 1122 } 1123 return null; 1124 } 1125 1126 public static Object testCharSwappedCompareLessEqualConstant2(FieldObject f) { 1127 if (charTestValue2 <= f.charValue) { 1128 return f; 1129 } 1130 return null; 1131 } 1132 1133 @Test 1134 public void testCharSwappedComparesLessEqual() { 1135 FieldObject f = new FieldObject(); 1136 test("testCharSwappedCompareLessEqual", f, charTestValue1); 1137 test("testCharSwappedCompareLessEqualConstant1", f); 1138 test("testCharSwappedCompareLessEqualConstant2", f); 1139 } 1140 1141 @Test 1142 public void testCharNullSwappedComparesLessEqual() { 1143 test("testCharSwappedCompareLessEqual", null, charTestValue1); 1144 } 1145 1146 @Test 1147 public void testCharNullSwappedComparesLessEqual1() { 1148 test("testCharSwappedCompareLessEqualConstant1", (Object) null); 1149 } 1150 1151 @Test 1152 public void testCharNullSwappedComparesLessEqual2() { 1153 test("testCharSwappedCompareLessEqualConstant2", (Object) null); 1154 } 1155 1156 public static Object testCharCompareGreater(FieldObject f, char charValue) { 1157 if (f.charValue > charValue) { 1158 return f; 1159 } 1160 return null; 1161 } 1162 1163 public static Object testCharCompareGreaterConstant1(FieldObject f) { 1164 if (f.charValue > charTestValue1) { 1165 return f; 1166 } 1167 return null; 1168 } 1169 1170 public static Object testCharCompareGreaterConstant2(FieldObject f) { 1171 if (f.charValue > charTestValue2) { 1172 return f; 1173 } 1174 return null; 1175 } 1176 1177 @Test 1178 public void testCharComparesGreater() { 1179 FieldObject f = new FieldObject(); 1180 test("testCharCompareGreater", f, charTestValue1); 1181 test("testCharCompareGreaterConstant1", f); 1182 test("testCharCompareGreaterConstant2", f); 1183 } 1184 1185 @Test 1186 public void testCharNullComparesGreater() { 1187 test("testCharCompareGreater", null, charTestValue1); 1188 } 1189 1190 @Test 1191 public void testCharNullComparesGreater1() { 1192 test("testCharCompareGreaterConstant1", (Object) null); 1193 } 1194 1195 @Test 1196 public void testCharNullComparesGreater2() { 1197 test("testCharCompareGreaterConstant2", (Object) null); 1198 } 1199 1200 public static Object testCharSwappedCompareGreater(FieldObject f, char charValue) { 1201 if (charValue > f.charValue) { 1202 return f; 1203 } 1204 return null; 1205 } 1206 1207 public static Object testCharSwappedCompareGreaterConstant1(FieldObject f) { 1208 if (charTestValue1 > f.charValue) { 1209 return f; 1210 } 1211 return null; 1212 } 1213 1214 public static Object testCharSwappedCompareGreaterConstant2(FieldObject f) { 1215 if (charTestValue2 > f.charValue) { 1216 return f; 1217 } 1218 return null; 1219 } 1220 1221 @Test 1222 public void testCharSwappedComparesGreater() { 1223 FieldObject f = new FieldObject(); 1224 test("testCharSwappedCompareGreater", f, charTestValue1); 1225 test("testCharSwappedCompareGreaterConstant1", f); 1226 test("testCharSwappedCompareGreaterConstant2", f); 1227 } 1228 1229 @Test 1230 public void testCharNullSwappedComparesGreater() { 1231 test("testCharSwappedCompareGreater", null, charTestValue1); 1232 } 1233 1234 @Test 1235 public void testCharNullSwappedComparesGreater1() { 1236 test("testCharSwappedCompareGreaterConstant1", (Object) null); 1237 } 1238 1239 @Test 1240 public void testCharNullSwappedComparesGreater2() { 1241 test("testCharSwappedCompareGreaterConstant2", (Object) null); 1242 } 1243 1244 public static Object testCharCompareGreaterEqual(FieldObject f, char charValue) { 1245 if (f.charValue >= charValue) { 1246 return f; 1247 } 1248 return null; 1249 } 1250 1251 public static Object testCharCompareGreaterEqualConstant1(FieldObject f) { 1252 if (f.charValue >= charTestValue1) { 1253 return f; 1254 } 1255 return null; 1256 } 1257 1258 public static Object testCharCompareGreaterEqualConstant2(FieldObject f) { 1259 if (f.charValue >= charTestValue2) { 1260 return f; 1261 } 1262 return null; 1263 } 1264 1265 @Test 1266 public void testCharComparesGreaterEqual() { 1267 FieldObject f = new FieldObject(); 1268 test("testCharCompareGreaterEqual", f, charTestValue1); 1269 test("testCharCompareGreaterEqualConstant1", f); 1270 test("testCharCompareGreaterEqualConstant2", f); 1271 } 1272 1273 @Test 1274 public void testCharNullComparesGreaterEqual() { 1275 test("testCharCompareGreaterEqual", null, charTestValue1); 1276 } 1277 1278 @Test 1279 public void testCharNullComparesGreaterEqual1() { 1280 test("testCharCompareGreaterEqualConstant1", (Object) null); 1281 } 1282 1283 @Test 1284 public void testCharNullComparesGreaterEqual2() { 1285 test("testCharCompareGreaterEqualConstant2", (Object) null); 1286 } 1287 1288 public static Object testCharSwappedCompareGreaterEqual(FieldObject f, char charValue) { 1289 if (charValue >= f.charValue) { 1290 return f; 1291 } 1292 return null; 1293 } 1294 1295 public static Object testCharSwappedCompareGreaterEqualConstant1(FieldObject f) { 1296 if (charTestValue1 >= f.charValue) { 1297 return f; 1298 } 1299 return null; 1300 } 1301 1302 public static Object testCharSwappedCompareGreaterEqualConstant2(FieldObject f) { 1303 if (charTestValue2 >= f.charValue) { 1304 return f; 1305 } 1306 return null; 1307 } 1308 1309 @Test 1310 public void testCharSwappedComparesGreaterEqual() { 1311 FieldObject f = new FieldObject(); 1312 test("testCharSwappedCompareGreaterEqual", f, charTestValue1); 1313 test("testCharSwappedCompareGreaterEqualConstant1", f); 1314 test("testCharSwappedCompareGreaterEqualConstant2", f); 1315 } 1316 1317 @Test 1318 public void testCharNullSwappedComparesGreaterEqual() { 1319 test("testCharSwappedCompareGreaterEqual", null, charTestValue1); 1320 } 1321 1322 @Test 1323 public void testCharNullSwappedComparesGreaterEqual1() { 1324 test("testCharSwappedCompareGreaterEqualConstant1", (Object) null); 1325 } 1326 1327 @Test 1328 public void testCharNullSwappedComparesGreaterEqual2() { 1329 test("testCharSwappedCompareGreaterEqualConstant2", (Object) null); 1330 } 1331 1332 public static Object testIntCompare(FieldObject f, int intValue) { 1333 if (f.intValue == intValue) { 1334 return f; 1335 } 1336 return null; 1337 } 1338 1339 public static Object testIntCompareConstant1(FieldObject f) { 1340 if (f.intValue == intTestValue1) { 1341 return f; 1342 } 1343 return null; 1344 } 1345 1346 public static Object testIntCompareConstant2(FieldObject f) { 1347 if (f.intValue == intTestValue2) { 1348 return f; 1349 } 1350 return null; 1351 } 1352 1353 @Test 1354 public void testIntCompares() { 1355 FieldObject f = new FieldObject(); 1356 test("testIntCompare", f, intTestValue1); 1357 test("testIntCompareConstant1", f); 1358 test("testIntCompareConstant2", f); 1359 } 1360 1361 @Test 1362 public void testIntNullCompares() { 1363 test("testIntCompare", null, intTestValue1); 1364 } 1365 1366 @Test 1367 public void testIntNullCompares1() { 1368 test("testIntCompareConstant1", (Object) null); 1369 } 1370 1371 @Test 1372 public void testIntNullCompares2() { 1373 test("testIntCompareConstant2", (Object) null); 1374 } 1375 1376 public static Object testIntCompareLess(FieldObject f, int intValue) { 1377 if (f.intValue < intValue) { 1378 return f; 1379 } 1380 return null; 1381 } 1382 1383 public static Object testIntCompareLessConstant1(FieldObject f) { 1384 if (f.intValue < intTestValue1) { 1385 return f; 1386 } 1387 return null; 1388 } 1389 1390 public static Object testIntCompareLessConstant2(FieldObject f) { 1391 if (f.intValue < intTestValue2) { 1392 return f; 1393 } 1394 return null; 1395 } 1396 1397 @Test 1398 public void testIntComparesLess() { 1399 FieldObject f = new FieldObject(); 1400 test("testIntCompareLess", f, intTestValue1); 1401 test("testIntCompareLessConstant1", f); 1402 test("testIntCompareLessConstant2", f); 1403 } 1404 1405 @Test 1406 public void testIntNullComparesLess() { 1407 test("testIntCompareLess", null, intTestValue1); 1408 } 1409 1410 @Test 1411 public void testIntNullComparesLess1() { 1412 test("testIntCompareLessConstant1", (Object) null); 1413 } 1414 1415 @Test 1416 public void testIntNullComparesLess2() { 1417 test("testIntCompareLessConstant2", (Object) null); 1418 } 1419 1420 public static Object testIntSwappedCompareLess(FieldObject f, int intValue) { 1421 if (intValue < f.intValue) { 1422 return f; 1423 } 1424 return null; 1425 } 1426 1427 public static Object testIntSwappedCompareLessConstant1(FieldObject f) { 1428 if (intTestValue1 < f.intValue) { 1429 return f; 1430 } 1431 return null; 1432 } 1433 1434 public static Object testIntSwappedCompareLessConstant2(FieldObject f) { 1435 if (intTestValue2 < f.intValue) { 1436 return f; 1437 } 1438 return null; 1439 } 1440 1441 @Test 1442 public void testIntSwappedComparesLess() { 1443 FieldObject f = new FieldObject(); 1444 test("testIntSwappedCompareLess", f, intTestValue1); 1445 test("testIntSwappedCompareLessConstant1", f); 1446 test("testIntSwappedCompareLessConstant2", f); 1447 } 1448 1449 @Test 1450 public void testIntNullSwappedComparesLess() { 1451 test("testIntSwappedCompareLess", null, intTestValue1); 1452 } 1453 1454 @Test 1455 public void testIntNullSwappedComparesLess1() { 1456 test("testIntSwappedCompareLessConstant1", (Object) null); 1457 } 1458 1459 @Test 1460 public void testIntNullSwappedComparesLess2() { 1461 test("testIntSwappedCompareLessConstant2", (Object) null); 1462 } 1463 1464 public static Object testIntCompareLessEqual(FieldObject f, int intValue) { 1465 if (f.intValue <= intValue) { 1466 return f; 1467 } 1468 return null; 1469 } 1470 1471 public static Object testIntCompareLessEqualConstant1(FieldObject f) { 1472 if (f.intValue <= intTestValue1) { 1473 return f; 1474 } 1475 return null; 1476 } 1477 1478 public static Object testIntCompareLessEqualConstant2(FieldObject f) { 1479 if (f.intValue <= intTestValue2) { 1480 return f; 1481 } 1482 return null; 1483 } 1484 1485 @Test 1486 public void testIntComparesLessEqual() { 1487 FieldObject f = new FieldObject(); 1488 test("testIntCompareLessEqual", f, intTestValue1); 1489 test("testIntCompareLessEqualConstant1", f); 1490 test("testIntCompareLessEqualConstant2", f); 1491 } 1492 1493 @Test 1494 public void testIntNullComparesLessEqual() { 1495 test("testIntCompareLessEqual", null, intTestValue1); 1496 } 1497 1498 @Test 1499 public void testIntNullComparesLessEqual1() { 1500 test("testIntCompareLessEqualConstant1", (Object) null); 1501 } 1502 1503 @Test 1504 public void testIntNullComparesLessEqual2() { 1505 test("testIntCompareLessEqualConstant2", (Object) null); 1506 } 1507 1508 public static Object testIntSwappedCompareLessEqual(FieldObject f, int intValue) { 1509 if (intValue <= f.intValue) { 1510 return f; 1511 } 1512 return null; 1513 } 1514 1515 public static Object testIntSwappedCompareLessEqualConstant1(FieldObject f) { 1516 if (intTestValue1 <= f.intValue) { 1517 return f; 1518 } 1519 return null; 1520 } 1521 1522 public static Object testIntSwappedCompareLessEqualConstant2(FieldObject f) { 1523 if (intTestValue2 <= f.intValue) { 1524 return f; 1525 } 1526 return null; 1527 } 1528 1529 @Test 1530 public void testIntSwappedComparesLessEqual() { 1531 FieldObject f = new FieldObject(); 1532 test("testIntSwappedCompareLessEqual", f, intTestValue1); 1533 test("testIntSwappedCompareLessEqualConstant1", f); 1534 test("testIntSwappedCompareLessEqualConstant2", f); 1535 } 1536 1537 @Test 1538 public void testIntNullSwappedComparesLessEqual() { 1539 test("testIntSwappedCompareLessEqual", null, intTestValue1); 1540 } 1541 1542 @Test 1543 public void testIntNullSwappedComparesLessEqual1() { 1544 test("testIntSwappedCompareLessEqualConstant1", (Object) null); 1545 } 1546 1547 @Test 1548 public void testIntNullSwappedComparesLessEqual2() { 1549 test("testIntSwappedCompareLessEqualConstant2", (Object) null); 1550 } 1551 1552 public static Object testIntCompareGreater(FieldObject f, int intValue) { 1553 if (f.intValue > intValue) { 1554 return f; 1555 } 1556 return null; 1557 } 1558 1559 public static Object testIntCompareGreaterConstant1(FieldObject f) { 1560 if (f.intValue > intTestValue1) { 1561 return f; 1562 } 1563 return null; 1564 } 1565 1566 public static Object testIntCompareGreaterConstant2(FieldObject f) { 1567 if (f.intValue > intTestValue2) { 1568 return f; 1569 } 1570 return null; 1571 } 1572 1573 @Test 1574 public void testIntComparesGreater() { 1575 FieldObject f = new FieldObject(); 1576 test("testIntCompareGreater", f, intTestValue1); 1577 test("testIntCompareGreaterConstant1", f); 1578 test("testIntCompareGreaterConstant2", f); 1579 } 1580 1581 @Test 1582 public void testIntNullComparesGreater() { 1583 test("testIntCompareGreater", null, intTestValue1); 1584 } 1585 1586 @Test 1587 public void testIntNullComparesGreater1() { 1588 test("testIntCompareGreaterConstant1", (Object) null); 1589 } 1590 1591 @Test 1592 public void testIntNullComparesGreater2() { 1593 test("testIntCompareGreaterConstant2", (Object) null); 1594 } 1595 1596 public static Object testIntSwappedCompareGreater(FieldObject f, int intValue) { 1597 if (intValue > f.intValue) { 1598 return f; 1599 } 1600 return null; 1601 } 1602 1603 public static Object testIntSwappedCompareGreaterConstant1(FieldObject f) { 1604 if (intTestValue1 > f.intValue) { 1605 return f; 1606 } 1607 return null; 1608 } 1609 1610 public static Object testIntSwappedCompareGreaterConstant2(FieldObject f) { 1611 if (intTestValue2 > f.intValue) { 1612 return f; 1613 } 1614 return null; 1615 } 1616 1617 @Test 1618 public void testIntSwappedComparesGreater() { 1619 FieldObject f = new FieldObject(); 1620 test("testIntSwappedCompareGreater", f, intTestValue1); 1621 test("testIntSwappedCompareGreaterConstant1", f); 1622 test("testIntSwappedCompareGreaterConstant2", f); 1623 } 1624 1625 @Test 1626 public void testIntNullSwappedComparesGreater() { 1627 test("testIntSwappedCompareGreater", null, intTestValue1); 1628 } 1629 1630 @Test 1631 public void testIntNullSwappedComparesGreater1() { 1632 test("testIntSwappedCompareGreaterConstant1", (Object) null); 1633 } 1634 1635 @Test 1636 public void testIntNullSwappedComparesGreater2() { 1637 test("testIntSwappedCompareGreaterConstant2", (Object) null); 1638 } 1639 1640 public static Object testIntCompareGreaterEqual(FieldObject f, int intValue) { 1641 if (f.intValue >= intValue) { 1642 return f; 1643 } 1644 return null; 1645 } 1646 1647 public static Object testIntCompareGreaterEqualConstant1(FieldObject f) { 1648 if (f.intValue >= intTestValue1) { 1649 return f; 1650 } 1651 return null; 1652 } 1653 1654 public static Object testIntCompareGreaterEqualConstant2(FieldObject f) { 1655 if (f.intValue >= intTestValue2) { 1656 return f; 1657 } 1658 return null; 1659 } 1660 1661 @Test 1662 public void testIntComparesGreaterEqual() { 1663 FieldObject f = new FieldObject(); 1664 test("testIntCompareGreaterEqual", f, intTestValue1); 1665 test("testIntCompareGreaterEqualConstant1", f); 1666 test("testIntCompareGreaterEqualConstant2", f); 1667 } 1668 1669 @Test 1670 public void testIntNullComparesGreaterEqual() { 1671 test("testIntCompareGreaterEqual", null, intTestValue1); 1672 } 1673 1674 @Test 1675 public void testIntNullComparesGreaterEqual1() { 1676 test("testIntCompareGreaterEqualConstant1", (Object) null); 1677 } 1678 1679 @Test 1680 public void testIntNullComparesGreaterEqual2() { 1681 test("testIntCompareGreaterEqualConstant2", (Object) null); 1682 } 1683 1684 public static Object testIntSwappedCompareGreaterEqual(FieldObject f, int intValue) { 1685 if (intValue >= f.intValue) { 1686 return f; 1687 } 1688 return null; 1689 } 1690 1691 public static Object testIntSwappedCompareGreaterEqualConstant1(FieldObject f) { 1692 if (intTestValue1 >= f.intValue) { 1693 return f; 1694 } 1695 return null; 1696 } 1697 1698 public static Object testIntSwappedCompareGreaterEqualConstant2(FieldObject f) { 1699 if (intTestValue2 >= f.intValue) { 1700 return f; 1701 } 1702 return null; 1703 } 1704 1705 @Test 1706 public void testIntSwappedComparesGreaterEqual() { 1707 FieldObject f = new FieldObject(); 1708 test("testIntSwappedCompareGreaterEqual", f, intTestValue1); 1709 test("testIntSwappedCompareGreaterEqualConstant1", f); 1710 test("testIntSwappedCompareGreaterEqualConstant2", f); 1711 } 1712 1713 @Test 1714 public void testIntNullSwappedComparesGreaterEqual() { 1715 test("testIntSwappedCompareGreaterEqual", null, intTestValue1); 1716 } 1717 1718 @Test 1719 public void testIntNullSwappedComparesGreaterEqual1() { 1720 test("testIntSwappedCompareGreaterEqualConstant1", (Object) null); 1721 } 1722 1723 @Test 1724 public void testIntNullSwappedComparesGreaterEqual2() { 1725 test("testIntSwappedCompareGreaterEqualConstant2", (Object) null); 1726 } 1727 1728 public static Object testFloatCompare(FieldObject f, float floatValue) { 1729 if (f.floatValue == floatValue) { 1730 return f; 1731 } 1732 return null; 1733 } 1734 1735 public static Object testFloatCompareConstant1(FieldObject f) { 1736 if (f.floatValue == floatTestValue1) { 1737 return f; 1738 } 1739 return null; 1740 } 1741 1742 public static Object testFloatCompareConstant2(FieldObject f) { 1743 if (f.floatValue == floatTestValue2) { 1744 return f; 1745 } 1746 return null; 1747 } 1748 1749 @Test 1750 public void testFloatCompares() { 1751 FieldObject f = new FieldObject(); 1752 test("testFloatCompare", f, floatTestValue1); 1753 test("testFloatCompareConstant1", f); 1754 test("testFloatCompareConstant2", f); 1755 } 1756 1757 @Test 1758 public void testFloatNullCompares() { 1759 test("testFloatCompare", null, floatTestValue1); 1760 } 1761 1762 @Test 1763 public void testFloatNullCompares1() { 1764 test("testFloatCompareConstant1", (Object) null); 1765 } 1766 1767 @Test 1768 public void testFloatNullCompares2() { 1769 test("testFloatCompareConstant2", (Object) null); 1770 } 1771 1772 public static Object testFloatCompareLess(FieldObject f, float floatValue) { 1773 if (f.floatValue < floatValue) { 1774 return f; 1775 } 1776 return null; 1777 } 1778 1779 public static Object testFloatCompareLessConstant1(FieldObject f) { 1780 if (f.floatValue < floatTestValue1) { 1781 return f; 1782 } 1783 return null; 1784 } 1785 1786 public static Object testFloatCompareLessConstant2(FieldObject f) { 1787 if (f.floatValue < floatTestValue2) { 1788 return f; 1789 } 1790 return null; 1791 } 1792 1793 @Test 1794 public void testFloatComparesLess() { 1795 FieldObject f = new FieldObject(); 1796 test("testFloatCompareLess", f, floatTestValue1); 1797 test("testFloatCompareLessConstant1", f); 1798 test("testFloatCompareLessConstant2", f); 1799 } 1800 1801 @Test 1802 public void testFloatNullComparesLess() { 1803 test("testFloatCompareLess", null, floatTestValue1); 1804 } 1805 1806 @Test 1807 public void testFloatNullComparesLess1() { 1808 test("testFloatCompareLessConstant1", (Object) null); 1809 } 1810 1811 @Test 1812 public void testFloatNullComparesLess2() { 1813 test("testFloatCompareLessConstant2", (Object) null); 1814 } 1815 1816 public static Object testFloatSwappedCompareLess(FieldObject f, float floatValue) { 1817 if (floatValue < f.floatValue) { 1818 return f; 1819 } 1820 return null; 1821 } 1822 1823 public static Object testFloatSwappedCompareLessConstant1(FieldObject f) { 1824 if (floatTestValue1 < f.floatValue) { 1825 return f; 1826 } 1827 return null; 1828 } 1829 1830 public static Object testFloatSwappedCompareLessConstant2(FieldObject f) { 1831 if (floatTestValue2 < f.floatValue) { 1832 return f; 1833 } 1834 return null; 1835 } 1836 1837 @Test 1838 public void testFloatSwappedComparesLess() { 1839 FieldObject f = new FieldObject(); 1840 test("testFloatSwappedCompareLess", f, floatTestValue1); 1841 test("testFloatSwappedCompareLessConstant1", f); 1842 test("testFloatSwappedCompareLessConstant2", f); 1843 } 1844 1845 @Test 1846 public void testFloatNullSwappedComparesLess() { 1847 test("testFloatSwappedCompareLess", null, floatTestValue1); 1848 } 1849 1850 @Test 1851 public void testFloatNullSwappedComparesLess1() { 1852 test("testFloatSwappedCompareLessConstant1", (Object) null); 1853 } 1854 1855 @Test 1856 public void testFloatNullSwappedComparesLess2() { 1857 test("testFloatSwappedCompareLessConstant2", (Object) null); 1858 } 1859 1860 public static Object testFloatCompareLessEqual(FieldObject f, float floatValue) { 1861 if (f.floatValue <= floatValue) { 1862 return f; 1863 } 1864 return null; 1865 } 1866 1867 public static Object testFloatCompareLessEqualConstant1(FieldObject f) { 1868 if (f.floatValue <= floatTestValue1) { 1869 return f; 1870 } 1871 return null; 1872 } 1873 1874 public static Object testFloatCompareLessEqualConstant2(FieldObject f) { 1875 if (f.floatValue <= floatTestValue2) { 1876 return f; 1877 } 1878 return null; 1879 } 1880 1881 @Test 1882 public void testFloatComparesLessEqual() { 1883 FieldObject f = new FieldObject(); 1884 test("testFloatCompareLessEqual", f, floatTestValue1); 1885 test("testFloatCompareLessEqualConstant1", f); 1886 test("testFloatCompareLessEqualConstant2", f); 1887 } 1888 1889 @Test 1890 public void testFloatNullComparesLessEqual() { 1891 test("testFloatCompareLessEqual", null, floatTestValue1); 1892 } 1893 1894 @Test 1895 public void testFloatNullComparesLessEqual1() { 1896 test("testFloatCompareLessEqualConstant1", (Object) null); 1897 } 1898 1899 @Test 1900 public void testFloatNullComparesLessEqual2() { 1901 test("testFloatCompareLessEqualConstant2", (Object) null); 1902 } 1903 1904 public static Object testFloatSwappedCompareLessEqual(FieldObject f, float floatValue) { 1905 if (floatValue <= f.floatValue) { 1906 return f; 1907 } 1908 return null; 1909 } 1910 1911 public static Object testFloatSwappedCompareLessEqualConstant1(FieldObject f) { 1912 if (floatTestValue1 <= f.floatValue) { 1913 return f; 1914 } 1915 return null; 1916 } 1917 1918 public static Object testFloatSwappedCompareLessEqualConstant2(FieldObject f) { 1919 if (floatTestValue2 <= f.floatValue) { 1920 return f; 1921 } 1922 return null; 1923 } 1924 1925 @Test 1926 public void testFloatSwappedComparesLessEqual() { 1927 FieldObject f = new FieldObject(); 1928 test("testFloatSwappedCompareLessEqual", f, floatTestValue1); 1929 test("testFloatSwappedCompareLessEqualConstant1", f); 1930 test("testFloatSwappedCompareLessEqualConstant2", f); 1931 } 1932 1933 @Test 1934 public void testFloatNullSwappedComparesLessEqual() { 1935 test("testFloatSwappedCompareLessEqual", null, floatTestValue1); 1936 } 1937 1938 @Test 1939 public void testFloatNullSwappedComparesLessEqual1() { 1940 test("testFloatSwappedCompareLessEqualConstant1", (Object) null); 1941 } 1942 1943 @Test 1944 public void testFloatNullSwappedComparesLessEqual2() { 1945 test("testFloatSwappedCompareLessEqualConstant2", (Object) null); 1946 } 1947 1948 public static Object testFloatCompareGreater(FieldObject f, float floatValue) { 1949 if (f.floatValue > floatValue) { 1950 return f; 1951 } 1952 return null; 1953 } 1954 1955 public static Object testFloatCompareGreaterConstant1(FieldObject f) { 1956 if (f.floatValue > floatTestValue1) { 1957 return f; 1958 } 1959 return null; 1960 } 1961 1962 public static Object testFloatCompareGreaterConstant2(FieldObject f) { 1963 if (f.floatValue > floatTestValue2) { 1964 return f; 1965 } 1966 return null; 1967 } 1968 1969 @Test 1970 public void testFloatComparesGreater() { 1971 FieldObject f = new FieldObject(); 1972 test("testFloatCompareGreater", f, floatTestValue1); 1973 test("testFloatCompareGreaterConstant1", f); 1974 test("testFloatCompareGreaterConstant2", f); 1975 } 1976 1977 @Test 1978 public void testFloatNullComparesGreater() { 1979 test("testFloatCompareGreater", null, floatTestValue1); 1980 } 1981 1982 @Test 1983 public void testFloatNullComparesGreater1() { 1984 test("testFloatCompareGreaterConstant1", (Object) null); 1985 } 1986 1987 @Test 1988 public void testFloatNullComparesGreater2() { 1989 test("testFloatCompareGreaterConstant2", (Object) null); 1990 } 1991 1992 public static Object testFloatSwappedCompareGreater(FieldObject f, float floatValue) { 1993 if (floatValue > f.floatValue) { 1994 return f; 1995 } 1996 return null; 1997 } 1998 1999 public static Object testFloatSwappedCompareGreaterConstant1(FieldObject f) { 2000 if (floatTestValue1 > f.floatValue) { 2001 return f; 2002 } 2003 return null; 2004 } 2005 2006 public static Object testFloatSwappedCompareGreaterConstant2(FieldObject f) { 2007 if (floatTestValue2 > f.floatValue) { 2008 return f; 2009 } 2010 return null; 2011 } 2012 2013 @Test 2014 public void testFloatSwappedComparesGreater() { 2015 FieldObject f = new FieldObject(); 2016 test("testFloatSwappedCompareGreater", f, floatTestValue1); 2017 test("testFloatSwappedCompareGreaterConstant1", f); 2018 test("testFloatSwappedCompareGreaterConstant2", f); 2019 } 2020 2021 @Test 2022 public void testFloatNullSwappedComparesGreater() { 2023 test("testFloatSwappedCompareGreater", null, floatTestValue1); 2024 } 2025 2026 @Test 2027 public void testFloatNullSwappedComparesGreater1() { 2028 test("testFloatSwappedCompareGreaterConstant1", (Object) null); 2029 } 2030 2031 @Test 2032 public void testFloatNullSwappedComparesGreater2() { 2033 test("testFloatSwappedCompareGreaterConstant2", (Object) null); 2034 } 2035 2036 public static Object testFloatCompareGreaterEqual(FieldObject f, float floatValue) { 2037 if (f.floatValue >= floatValue) { 2038 return f; 2039 } 2040 return null; 2041 } 2042 2043 public static Object testFloatCompareGreaterEqualConstant1(FieldObject f) { 2044 if (f.floatValue >= floatTestValue1) { 2045 return f; 2046 } 2047 return null; 2048 } 2049 2050 public static Object testFloatCompareGreaterEqualConstant2(FieldObject f) { 2051 if (f.floatValue >= floatTestValue2) { 2052 return f; 2053 } 2054 return null; 2055 } 2056 2057 @Test 2058 public void testFloatComparesGreaterEqual() { 2059 FieldObject f = new FieldObject(); 2060 test("testFloatCompareGreaterEqual", f, floatTestValue1); 2061 test("testFloatCompareGreaterEqualConstant1", f); 2062 test("testFloatCompareGreaterEqualConstant2", f); 2063 } 2064 2065 @Test 2066 public void testFloatNullComparesGreaterEqual() { 2067 test("testFloatCompareGreaterEqual", null, floatTestValue1); 2068 } 2069 2070 @Test 2071 public void testFloatNullComparesGreaterEqual1() { 2072 test("testFloatCompareGreaterEqualConstant1", (Object) null); 2073 } 2074 2075 @Test 2076 public void testFloatNullComparesGreaterEqual2() { 2077 test("testFloatCompareGreaterEqualConstant2", (Object) null); 2078 } 2079 2080 public static Object testFloatSwappedCompareGreaterEqual(FieldObject f, float floatValue) { 2081 if (floatValue >= f.floatValue) { 2082 return f; 2083 } 2084 return null; 2085 } 2086 2087 public static Object testFloatSwappedCompareGreaterEqualConstant1(FieldObject f) { 2088 if (floatTestValue1 >= f.floatValue) { 2089 return f; 2090 } 2091 return null; 2092 } 2093 2094 public static Object testFloatSwappedCompareGreaterEqualConstant2(FieldObject f) { 2095 if (floatTestValue2 >= f.floatValue) { 2096 return f; 2097 } 2098 return null; 2099 } 2100 2101 @Test 2102 public void testFloatSwappedComparesGreaterEqual() { 2103 FieldObject f = new FieldObject(); 2104 test("testFloatSwappedCompareGreaterEqual", f, floatTestValue1); 2105 test("testFloatSwappedCompareGreaterEqualConstant1", f); 2106 test("testFloatSwappedCompareGreaterEqualConstant2", f); 2107 } 2108 2109 @Test 2110 public void testFloatNullSwappedComparesGreaterEqual() { 2111 test("testFloatSwappedCompareGreaterEqual", null, floatTestValue1); 2112 } 2113 2114 @Test 2115 public void testFloatNullSwappedComparesGreaterEqual1() { 2116 test("testFloatSwappedCompareGreaterEqualConstant1", (Object) null); 2117 } 2118 2119 @Test 2120 public void testFloatNullSwappedComparesGreaterEqual2() { 2121 test("testFloatSwappedCompareGreaterEqualConstant2", (Object) null); 2122 } 2123 2124 public static Object testLongCompare(FieldObject f, long longValue) { 2125 if (f.longValue == longValue) { 2126 return f; 2127 } 2128 return null; 2129 } 2130 2131 public static Object testLongCompareConstant1(FieldObject f) { 2132 if (f.longValue == longTestValue1) { 2133 return f; 2134 } 2135 return null; 2136 } 2137 2138 public static Object testLongCompareConstant2(FieldObject f) { 2139 if (f.longValue == longTestValue2) { 2140 return f; 2141 } 2142 return null; 2143 } 2144 2145 @Test 2146 public void testLongCompares() { 2147 FieldObject f = new FieldObject(); 2148 test("testLongCompare", f, longTestValue1); 2149 test("testLongCompareConstant1", f); 2150 test("testLongCompareConstant2", f); 2151 } 2152 2153 @Test 2154 public void testLongNullCompares() { 2155 test("testLongCompare", null, longTestValue1); 2156 } 2157 2158 @Test 2159 public void testLongNullCompares1() { 2160 test("testLongCompareConstant1", (Object) null); 2161 } 2162 2163 @Test 2164 public void testLongNullCompares2() { 2165 test("testLongCompareConstant2", (Object) null); 2166 } 2167 2168 public static Object testLongCompareLess(FieldObject f, long longValue) { 2169 if (f.longValue < longValue) { 2170 return f; 2171 } 2172 return null; 2173 } 2174 2175 public static Object testLongCompareLessConstant1(FieldObject f) { 2176 if (f.longValue < longTestValue1) { 2177 return f; 2178 } 2179 return null; 2180 } 2181 2182 public static Object testLongCompareLessConstant2(FieldObject f) { 2183 if (f.longValue < longTestValue2) { 2184 return f; 2185 } 2186 return null; 2187 } 2188 2189 @Test 2190 public void testLongComparesLess() { 2191 FieldObject f = new FieldObject(); 2192 test("testLongCompareLess", f, longTestValue1); 2193 test("testLongCompareLessConstant1", f); 2194 test("testLongCompareLessConstant2", f); 2195 } 2196 2197 @Test 2198 public void testLongNullComparesLess() { 2199 test("testLongCompareLess", null, longTestValue1); 2200 } 2201 2202 @Test 2203 public void testLongNullComparesLess1() { 2204 test("testLongCompareLessConstant1", (Object) null); 2205 } 2206 2207 @Test 2208 public void testLongNullComparesLess2() { 2209 test("testLongCompareLessConstant2", (Object) null); 2210 } 2211 2212 public static Object testLongSwappedCompareLess(FieldObject f, long longValue) { 2213 if (longValue < f.longValue) { 2214 return f; 2215 } 2216 return null; 2217 } 2218 2219 public static Object testLongSwappedCompareLessConstant1(FieldObject f) { 2220 if (longTestValue1 < f.longValue) { 2221 return f; 2222 } 2223 return null; 2224 } 2225 2226 public static Object testLongSwappedCompareLessConstant2(FieldObject f) { 2227 if (longTestValue2 < f.longValue) { 2228 return f; 2229 } 2230 return null; 2231 } 2232 2233 @Test 2234 public void testLongSwappedComparesLess() { 2235 FieldObject f = new FieldObject(); 2236 test("testLongSwappedCompareLess", f, longTestValue1); 2237 test("testLongSwappedCompareLessConstant1", f); 2238 test("testLongSwappedCompareLessConstant2", f); 2239 } 2240 2241 @Test 2242 public void testLongNullSwappedComparesLess() { 2243 test("testLongSwappedCompareLess", null, longTestValue1); 2244 } 2245 2246 @Test 2247 public void testLongNullSwappedComparesLess1() { 2248 test("testLongSwappedCompareLessConstant1", (Object) null); 2249 } 2250 2251 @Test 2252 public void testLongNullSwappedComparesLess2() { 2253 test("testLongSwappedCompareLessConstant2", (Object) null); 2254 } 2255 2256 public static Object testLongCompareLessEqual(FieldObject f, long longValue) { 2257 if (f.longValue <= longValue) { 2258 return f; 2259 } 2260 return null; 2261 } 2262 2263 public static Object testLongCompareLessEqualConstant1(FieldObject f) { 2264 if (f.longValue <= longTestValue1) { 2265 return f; 2266 } 2267 return null; 2268 } 2269 2270 public static Object testLongCompareLessEqualConstant2(FieldObject f) { 2271 if (f.longValue <= longTestValue2) { 2272 return f; 2273 } 2274 return null; 2275 } 2276 2277 @Test 2278 public void testLongComparesLessEqual() { 2279 FieldObject f = new FieldObject(); 2280 test("testLongCompareLessEqual", f, longTestValue1); 2281 test("testLongCompareLessEqualConstant1", f); 2282 test("testLongCompareLessEqualConstant2", f); 2283 } 2284 2285 @Test 2286 public void testLongNullComparesLessEqual() { 2287 test("testLongCompareLessEqual", null, longTestValue1); 2288 } 2289 2290 @Test 2291 public void testLongNullComparesLessEqual1() { 2292 test("testLongCompareLessEqualConstant1", (Object) null); 2293 } 2294 2295 @Test 2296 public void testLongNullComparesLessEqual2() { 2297 test("testLongCompareLessEqualConstant2", (Object) null); 2298 } 2299 2300 public static Object testLongSwappedCompareLessEqual(FieldObject f, long longValue) { 2301 if (longValue <= f.longValue) { 2302 return f; 2303 } 2304 return null; 2305 } 2306 2307 public static Object testLongSwappedCompareLessEqualConstant1(FieldObject f) { 2308 if (longTestValue1 <= f.longValue) { 2309 return f; 2310 } 2311 return null; 2312 } 2313 2314 public static Object testLongSwappedCompareLessEqualConstant2(FieldObject f) { 2315 if (longTestValue2 <= f.longValue) { 2316 return f; 2317 } 2318 return null; 2319 } 2320 2321 @Test 2322 public void testLongSwappedComparesLessEqual() { 2323 FieldObject f = new FieldObject(); 2324 test("testLongSwappedCompareLessEqual", f, longTestValue1); 2325 test("testLongSwappedCompareLessEqualConstant1", f); 2326 test("testLongSwappedCompareLessEqualConstant2", f); 2327 } 2328 2329 @Test 2330 public void testLongNullSwappedComparesLessEqual() { 2331 test("testLongSwappedCompareLessEqual", null, longTestValue1); 2332 } 2333 2334 @Test 2335 public void testLongNullSwappedComparesLessEqual1() { 2336 test("testLongSwappedCompareLessEqualConstant1", (Object) null); 2337 } 2338 2339 @Test 2340 public void testLongNullSwappedComparesLessEqual2() { 2341 test("testLongSwappedCompareLessEqualConstant2", (Object) null); 2342 } 2343 2344 public static Object testLongCompareGreater(FieldObject f, long longValue) { 2345 if (f.longValue > longValue) { 2346 return f; 2347 } 2348 return null; 2349 } 2350 2351 public static Object testLongCompareGreaterConstant1(FieldObject f) { 2352 if (f.longValue > longTestValue1) { 2353 return f; 2354 } 2355 return null; 2356 } 2357 2358 public static Object testLongCompareGreaterConstant2(FieldObject f) { 2359 if (f.longValue > longTestValue2) { 2360 return f; 2361 } 2362 return null; 2363 } 2364 2365 @Test 2366 public void testLongComparesGreater() { 2367 FieldObject f = new FieldObject(); 2368 test("testLongCompareGreater", f, longTestValue1); 2369 test("testLongCompareGreaterConstant1", f); 2370 test("testLongCompareGreaterConstant2", f); 2371 } 2372 2373 @Test 2374 public void testLongNullComparesGreater() { 2375 test("testLongCompareGreater", null, longTestValue1); 2376 } 2377 2378 @Test 2379 public void testLongNullComparesGreater1() { 2380 test("testLongCompareGreaterConstant1", (Object) null); 2381 } 2382 2383 @Test 2384 public void testLongNullComparesGreater2() { 2385 test("testLongCompareGreaterConstant2", (Object) null); 2386 } 2387 2388 public static Object testLongSwappedCompareGreater(FieldObject f, long longValue) { 2389 if (longValue > f.longValue) { 2390 return f; 2391 } 2392 return null; 2393 } 2394 2395 public static Object testLongSwappedCompareGreaterConstant1(FieldObject f) { 2396 if (longTestValue1 > f.longValue) { 2397 return f; 2398 } 2399 return null; 2400 } 2401 2402 public static Object testLongSwappedCompareGreaterConstant2(FieldObject f) { 2403 if (longTestValue2 > f.longValue) { 2404 return f; 2405 } 2406 return null; 2407 } 2408 2409 @Test 2410 public void testLongSwappedComparesGreater() { 2411 FieldObject f = new FieldObject(); 2412 test("testLongSwappedCompareGreater", f, longTestValue1); 2413 test("testLongSwappedCompareGreaterConstant1", f); 2414 test("testLongSwappedCompareGreaterConstant2", f); 2415 } 2416 2417 @Test 2418 public void testLongNullSwappedComparesGreater() { 2419 test("testLongSwappedCompareGreater", null, longTestValue1); 2420 } 2421 2422 @Test 2423 public void testLongNullSwappedComparesGreater1() { 2424 test("testLongSwappedCompareGreaterConstant1", (Object) null); 2425 } 2426 2427 @Test 2428 public void testLongNullSwappedComparesGreater2() { 2429 test("testLongSwappedCompareGreaterConstant2", (Object) null); 2430 } 2431 2432 public static Object testLongCompareGreaterEqual(FieldObject f, long longValue) { 2433 if (f.longValue >= longValue) { 2434 return f; 2435 } 2436 return null; 2437 } 2438 2439 public static Object testLongCompareGreaterEqualConstant1(FieldObject f) { 2440 if (f.longValue >= longTestValue1) { 2441 return f; 2442 } 2443 return null; 2444 } 2445 2446 public static Object testLongCompareGreaterEqualConstant2(FieldObject f) { 2447 if (f.longValue >= longTestValue2) { 2448 return f; 2449 } 2450 return null; 2451 } 2452 2453 @Test 2454 public void testLongComparesGreaterEqual() { 2455 FieldObject f = new FieldObject(); 2456 test("testLongCompareGreaterEqual", f, longTestValue1); 2457 test("testLongCompareGreaterEqualConstant1", f); 2458 test("testLongCompareGreaterEqualConstant2", f); 2459 } 2460 2461 @Test 2462 public void testLongNullComparesGreaterEqual() { 2463 test("testLongCompareGreaterEqual", null, longTestValue1); 2464 } 2465 2466 @Test 2467 public void testLongNullComparesGreaterEqual1() { 2468 test("testLongCompareGreaterEqualConstant1", (Object) null); 2469 } 2470 2471 @Test 2472 public void testLongNullComparesGreaterEqual2() { 2473 test("testLongCompareGreaterEqualConstant2", (Object) null); 2474 } 2475 2476 public static Object testLongSwappedCompareGreaterEqual(FieldObject f, long longValue) { 2477 if (longValue >= f.longValue) { 2478 return f; 2479 } 2480 return null; 2481 } 2482 2483 public static Object testLongSwappedCompareGreaterEqualConstant1(FieldObject f) { 2484 if (longTestValue1 >= f.longValue) { 2485 return f; 2486 } 2487 return null; 2488 } 2489 2490 public static Object testLongSwappedCompareGreaterEqualConstant2(FieldObject f) { 2491 if (longTestValue2 >= f.longValue) { 2492 return f; 2493 } 2494 return null; 2495 } 2496 2497 @Test 2498 public void testLongSwappedComparesGreaterEqual() { 2499 FieldObject f = new FieldObject(); 2500 test("testLongSwappedCompareGreaterEqual", f, longTestValue1); 2501 test("testLongSwappedCompareGreaterEqualConstant1", f); 2502 test("testLongSwappedCompareGreaterEqualConstant2", f); 2503 } 2504 2505 @Test 2506 public void testLongNullSwappedComparesGreaterEqual() { 2507 test("testLongSwappedCompareGreaterEqual", null, longTestValue1); 2508 } 2509 2510 @Test 2511 public void testLongNullSwappedComparesGreaterEqual1() { 2512 test("testLongSwappedCompareGreaterEqualConstant1", (Object) null); 2513 } 2514 2515 @Test 2516 public void testLongNullSwappedComparesGreaterEqual2() { 2517 test("testLongSwappedCompareGreaterEqualConstant2", (Object) null); 2518 } 2519 2520 public static Object testDoubleCompare(FieldObject f, double doubleValue) { 2521 if (f.doubleValue == doubleValue) { 2522 return f; 2523 } 2524 return null; 2525 } 2526 2527 public static Object testDoubleCompareConstant1(FieldObject f) { 2528 if (f.doubleValue == doubleTestValue1) { 2529 return f; 2530 } 2531 return null; 2532 } 2533 2534 public static Object testDoubleCompareConstant2(FieldObject f) { 2535 if (f.doubleValue == doubleTestValue2) { 2536 return f; 2537 } 2538 return null; 2539 } 2540 2541 @Test 2542 public void testDoubleCompares() { 2543 FieldObject f = new FieldObject(); 2544 test("testDoubleCompare", f, doubleTestValue1); 2545 test("testDoubleCompareConstant1", f); 2546 test("testDoubleCompareConstant2", f); 2547 } 2548 2549 @Test 2550 public void testDoubleNullCompares() { 2551 test("testDoubleCompare", null, doubleTestValue1); 2552 } 2553 2554 @Test 2555 public void testDoubleNullCompares1() { 2556 test("testDoubleCompareConstant1", (Object) null); 2557 } 2558 2559 @Test 2560 public void testDoubleNullCompares2() { 2561 test("testDoubleCompareConstant2", (Object) null); 2562 } 2563 2564 public static Object testDoubleCompareLess(FieldObject f, double doubleValue) { 2565 if (f.doubleValue < doubleValue) { 2566 return f; 2567 } 2568 return null; 2569 } 2570 2571 public static Object testDoubleCompareLessConstant1(FieldObject f) { 2572 if (f.doubleValue < doubleTestValue1) { 2573 return f; 2574 } 2575 return null; 2576 } 2577 2578 public static Object testDoubleCompareLessConstant2(FieldObject f) { 2579 if (f.doubleValue < doubleTestValue2) { 2580 return f; 2581 } 2582 return null; 2583 } 2584 2585 @Test 2586 public void testDoubleComparesLess() { 2587 FieldObject f = new FieldObject(); 2588 test("testDoubleCompareLess", f, doubleTestValue1); 2589 test("testDoubleCompareLessConstant1", f); 2590 test("testDoubleCompareLessConstant2", f); 2591 } 2592 2593 @Test 2594 public void testDoubleNullComparesLess() { 2595 test("testDoubleCompareLess", null, doubleTestValue1); 2596 } 2597 2598 @Test 2599 public void testDoubleNullComparesLess1() { 2600 test("testDoubleCompareLessConstant1", (Object) null); 2601 } 2602 2603 @Test 2604 public void testDoubleNullComparesLess2() { 2605 test("testDoubleCompareLessConstant2", (Object) null); 2606 } 2607 2608 public static Object testDoubleSwappedCompareLess(FieldObject f, double doubleValue) { 2609 if (doubleValue < f.doubleValue) { 2610 return f; 2611 } 2612 return null; 2613 } 2614 2615 public static Object testDoubleSwappedCompareLessConstant1(FieldObject f) { 2616 if (doubleTestValue1 < f.doubleValue) { 2617 return f; 2618 } 2619 return null; 2620 } 2621 2622 public static Object testDoubleSwappedCompareLessConstant2(FieldObject f) { 2623 if (doubleTestValue2 < f.doubleValue) { 2624 return f; 2625 } 2626 return null; 2627 } 2628 2629 @Test 2630 public void testDoubleSwappedComparesLess() { 2631 FieldObject f = new FieldObject(); 2632 test("testDoubleSwappedCompareLess", f, doubleTestValue1); 2633 test("testDoubleSwappedCompareLessConstant1", f); 2634 test("testDoubleSwappedCompareLessConstant2", f); 2635 } 2636 2637 @Test 2638 public void testDoubleNullSwappedComparesLess() { 2639 test("testDoubleSwappedCompareLess", null, doubleTestValue1); 2640 } 2641 2642 @Test 2643 public void testDoubleNullSwappedComparesLess1() { 2644 test("testDoubleSwappedCompareLessConstant1", (Object) null); 2645 } 2646 2647 @Test 2648 public void testDoubleNullSwappedComparesLess2() { 2649 test("testDoubleSwappedCompareLessConstant2", (Object) null); 2650 } 2651 2652 public static Object testDoubleCompareLessEqual(FieldObject f, double doubleValue) { 2653 if (f.doubleValue <= doubleValue) { 2654 return f; 2655 } 2656 return null; 2657 } 2658 2659 public static Object testDoubleCompareLessEqualConstant1(FieldObject f) { 2660 if (f.doubleValue <= doubleTestValue1) { 2661 return f; 2662 } 2663 return null; 2664 } 2665 2666 public static Object testDoubleCompareLessEqualConstant2(FieldObject f) { 2667 if (f.doubleValue <= doubleTestValue2) { 2668 return f; 2669 } 2670 return null; 2671 } 2672 2673 @Test 2674 public void testDoubleComparesLessEqual() { 2675 FieldObject f = new FieldObject(); 2676 test("testDoubleCompareLessEqual", f, doubleTestValue1); 2677 test("testDoubleCompareLessEqualConstant1", f); 2678 test("testDoubleCompareLessEqualConstant2", f); 2679 } 2680 2681 @Test 2682 public void testDoubleNullComparesLessEqual() { 2683 test("testDoubleCompareLessEqual", null, doubleTestValue1); 2684 } 2685 2686 @Test 2687 public void testDoubleNullComparesLessEqual1() { 2688 test("testDoubleCompareLessEqualConstant1", (Object) null); 2689 } 2690 2691 @Test 2692 public void testDoubleNullComparesLessEqual2() { 2693 test("testDoubleCompareLessEqualConstant2", (Object) null); 2694 } 2695 2696 public static Object testDoubleSwappedCompareLessEqual(FieldObject f, double doubleValue) { 2697 if (doubleValue <= f.doubleValue) { 2698 return f; 2699 } 2700 return null; 2701 } 2702 2703 public static Object testDoubleSwappedCompareLessEqualConstant1(FieldObject f) { 2704 if (doubleTestValue1 <= f.doubleValue) { 2705 return f; 2706 } 2707 return null; 2708 } 2709 2710 public static Object testDoubleSwappedCompareLessEqualConstant2(FieldObject f) { 2711 if (doubleTestValue2 <= f.doubleValue) { 2712 return f; 2713 } 2714 return null; 2715 } 2716 2717 @Test 2718 public void testDoubleSwappedComparesLessEqual() { 2719 FieldObject f = new FieldObject(); 2720 test("testDoubleSwappedCompareLessEqual", f, doubleTestValue1); 2721 test("testDoubleSwappedCompareLessEqualConstant1", f); 2722 test("testDoubleSwappedCompareLessEqualConstant2", f); 2723 } 2724 2725 @Test 2726 public void testDoubleNullSwappedComparesLessEqual() { 2727 test("testDoubleSwappedCompareLessEqual", null, doubleTestValue1); 2728 } 2729 2730 @Test 2731 public void testDoubleNullSwappedComparesLessEqual1() { 2732 test("testDoubleSwappedCompareLessEqualConstant1", (Object) null); 2733 } 2734 2735 @Test 2736 public void testDoubleNullSwappedComparesLessEqual2() { 2737 test("testDoubleSwappedCompareLessEqualConstant2", (Object) null); 2738 } 2739 2740 public static Object testDoubleCompareGreater(FieldObject f, double doubleValue) { 2741 if (f.doubleValue > doubleValue) { 2742 return f; 2743 } 2744 return null; 2745 } 2746 2747 public static Object testDoubleCompareGreaterConstant1(FieldObject f) { 2748 if (f.doubleValue > doubleTestValue1) { 2749 return f; 2750 } 2751 return null; 2752 } 2753 2754 public static Object testDoubleCompareGreaterConstant2(FieldObject f) { 2755 if (f.doubleValue > doubleTestValue2) { 2756 return f; 2757 } 2758 return null; 2759 } 2760 2761 @Test 2762 public void testDoubleComparesGreater() { 2763 FieldObject f = new FieldObject(); 2764 test("testDoubleCompareGreater", f, doubleTestValue1); 2765 test("testDoubleCompareGreaterConstant1", f); 2766 test("testDoubleCompareGreaterConstant2", f); 2767 } 2768 2769 @Test 2770 public void testDoubleNullComparesGreater() { 2771 test("testDoubleCompareGreater", null, doubleTestValue1); 2772 } 2773 2774 @Test 2775 public void testDoubleNullComparesGreater1() { 2776 test("testDoubleCompareGreaterConstant1", (Object) null); 2777 } 2778 2779 @Test 2780 public void testDoubleNullComparesGreater2() { 2781 test("testDoubleCompareGreaterConstant2", (Object) null); 2782 } 2783 2784 public static Object testDoubleSwappedCompareGreater(FieldObject f, double doubleValue) { 2785 if (doubleValue > f.doubleValue) { 2786 return f; 2787 } 2788 return null; 2789 } 2790 2791 public static Object testDoubleSwappedCompareGreaterConstant1(FieldObject f) { 2792 if (doubleTestValue1 > f.doubleValue) { 2793 return f; 2794 } 2795 return null; 2796 } 2797 2798 public static Object testDoubleSwappedCompareGreaterConstant2(FieldObject f) { 2799 if (doubleTestValue2 > f.doubleValue) { 2800 return f; 2801 } 2802 return null; 2803 } 2804 2805 @Test 2806 public void testDoubleSwappedComparesGreater() { 2807 FieldObject f = new FieldObject(); 2808 test("testDoubleSwappedCompareGreater", f, doubleTestValue1); 2809 test("testDoubleSwappedCompareGreaterConstant1", f); 2810 test("testDoubleSwappedCompareGreaterConstant2", f); 2811 } 2812 2813 @Test 2814 public void testDoubleNullSwappedComparesGreater() { 2815 test("testDoubleSwappedCompareGreater", null, doubleTestValue1); 2816 } 2817 2818 @Test 2819 public void testDoubleNullSwappedComparesGreater1() { 2820 test("testDoubleSwappedCompareGreaterConstant1", (Object) null); 2821 } 2822 2823 @Test 2824 public void testDoubleNullSwappedComparesGreater2() { 2825 test("testDoubleSwappedCompareGreaterConstant2", (Object) null); 2826 } 2827 2828 public static Object testDoubleCompareGreaterEqual(FieldObject f, double doubleValue) { 2829 if (f.doubleValue >= doubleValue) { 2830 return f; 2831 } 2832 return null; 2833 } 2834 2835 public static Object testDoubleCompareGreaterEqualConstant1(FieldObject f) { 2836 if (f.doubleValue >= doubleTestValue1) { 2837 return f; 2838 } 2839 return null; 2840 } 2841 2842 public static Object testDoubleCompareGreaterEqualConstant2(FieldObject f) { 2843 if (f.doubleValue >= doubleTestValue2) { 2844 return f; 2845 } 2846 return null; 2847 } 2848 2849 @Test 2850 public void testDoubleComparesGreaterEqual() { 2851 FieldObject f = new FieldObject(); 2852 test("testDoubleCompareGreaterEqual", f, doubleTestValue1); 2853 test("testDoubleCompareGreaterEqualConstant1", f); 2854 test("testDoubleCompareGreaterEqualConstant2", f); 2855 } 2856 2857 @Test 2858 public void testDoubleNullComparesGreaterEqual() { 2859 test("testDoubleCompareGreaterEqual", null, doubleTestValue1); 2860 } 2861 2862 @Test 2863 public void testDoubleNullComparesGreaterEqual1() { 2864 test("testDoubleCompareGreaterEqualConstant1", (Object) null); 2865 } 2866 2867 @Test 2868 public void testDoubleNullComparesGreaterEqual2() { 2869 test("testDoubleCompareGreaterEqualConstant2", (Object) null); 2870 } 2871 2872 public static Object testDoubleSwappedCompareGreaterEqual(FieldObject f, double doubleValue) { 2873 if (doubleValue >= f.doubleValue) { 2874 return f; 2875 } 2876 return null; 2877 } 2878 2879 public static Object testDoubleSwappedCompareGreaterEqualConstant1(FieldObject f) { 2880 if (doubleTestValue1 >= f.doubleValue) { 2881 return f; 2882 } 2883 return null; 2884 } 2885 2886 public static Object testDoubleSwappedCompareGreaterEqualConstant2(FieldObject f) { 2887 if (doubleTestValue2 >= f.doubleValue) { 2888 return f; 2889 } 2890 return null; 2891 } 2892 2893 @Test 2894 public void testDoubleSwappedComparesGreaterEqual() { 2895 FieldObject f = new FieldObject(); 2896 test("testDoubleSwappedCompareGreaterEqual", f, doubleTestValue1); 2897 test("testDoubleSwappedCompareGreaterEqualConstant1", f); 2898 test("testDoubleSwappedCompareGreaterEqualConstant2", f); 2899 } 2900 2901 @Test 2902 public void testDoubleNullSwappedComparesGreaterEqual() { 2903 test("testDoubleSwappedCompareGreaterEqual", null, doubleTestValue1); 2904 } 2905 2906 @Test 2907 public void testDoubleNullSwappedComparesGreaterEqual1() { 2908 test("testDoubleSwappedCompareGreaterEqualConstant1", (Object) null); 2909 } 2910 2911 @Test 2912 public void testDoubleNullSwappedComparesGreaterEqual2() { 2913 test("testDoubleSwappedCompareGreaterEqualConstant2", (Object) null); 2914 } 2915 2916 public static Object testObjectCompare(FieldObject f, Object objectValue) { 2917 if (f.objectValue == objectValue) { 2918 return f; 2919 } 2920 return null; 2921 } 2922 2923 public static Object testObjectCompareConstant1(FieldObject f) { 2924 if (f.objectValue == objectTestValue1) { 2925 return f; 2926 } 2927 return null; 2928 } 2929 2930 public static Object testObjectCompareConstant2(FieldObject f) { 2931 if (f.objectValue == objectTestValue2) { 2932 return f; 2933 } 2934 return null; 2935 } 2936 2937 @Test 2938 public void testObjectCompares() { 2939 FieldObject f = new FieldObject(); 2940 test("testObjectCompare", f, objectTestValue1); 2941 test("testObjectCompareConstant1", f); 2942 test("testObjectCompareConstant2", f); 2943 } 2944 2945 @Test 2946 public void testObjectNullCompares() { 2947 test("testObjectCompare", null, objectTestValue1); 2948 } 2949 2950 @Test 2951 public void testObjectNullCompares1() { 2952 test("testObjectCompareConstant1", (Object) null); 2953 } 2954 2955 @Test 2956 public void testObjectNullCompares2() { 2957 test("testObjectCompareConstant2", (Object) null); 2958 } 2959 2960 public static int testByteAdd(FieldObject f, byte byteValue) { 2961 return f.byteValue + byteValue; 2962 } 2963 2964 public static int testByteAddConstant1(FieldObject f) { 2965 return f.byteValue + byteTestValue1; 2966 } 2967 2968 public static int testByteAddConstant2(FieldObject f) { 2969 return f.byteValue + byteTestValue2; 2970 } 2971 2972 @Test 2973 public void testByteAdds() { 2974 FieldObject f = new FieldObject(); 2975 test("testByteAdd", f, byteTestValue1); 2976 test("testByteAddConstant1", f); 2977 test("testByteAddConstant2", f); 2978 } 2979 2980 @Test 2981 public void testByteNullAdd() { 2982 test("testByteAdd", null, byteTestValue1); 2983 } 2984 2985 public static int testShortAdd(FieldObject f, short shortValue) { 2986 return f.shortValue + shortValue; 2987 } 2988 2989 public static int testShortAddConstant1(FieldObject f) { 2990 return f.shortValue + shortTestValue1; 2991 } 2992 2993 public static int testShortAddConstant2(FieldObject f) { 2994 return f.shortValue + shortTestValue2; 2995 } 2996 2997 @Test 2998 public void testShortAdds() { 2999 FieldObject f = new FieldObject(); 3000 test("testShortAdd", f, shortTestValue1); 3001 test("testShortAddConstant1", f); 3002 test("testShortAddConstant2", f); 3003 } 3004 3005 @Test 3006 public void testShortNullAdd() { 3007 test("testShortAdd", null, shortTestValue1); 3008 } 3009 3010 public static int testCharAdd(FieldObject f, char charValue) { 3011 return f.charValue + charValue; 3012 } 3013 3014 public static int testCharAddConstant1(FieldObject f) { 3015 return f.charValue + charTestValue1; 3016 } 3017 3018 public static int testCharAddConstant2(FieldObject f) { 3019 return f.charValue + charTestValue2; 3020 } 3021 3022 @Test 3023 public void testCharAdds() { 3024 FieldObject f = new FieldObject(); 3025 test("testCharAdd", f, charTestValue1); 3026 test("testCharAddConstant1", f); 3027 test("testCharAddConstant2", f); 3028 } 3029 3030 @Test 3031 public void testCharNullAdd() { 3032 test("testCharAdd", null, charTestValue1); 3033 } 3034 3035 public static int testIntAdd(FieldObject f, int intValue) { 3036 return f.intValue + intValue; 3037 } 3038 3039 public static int testIntAddConstant1(FieldObject f) { 3040 return f.intValue + intTestValue1; 3041 } 3042 3043 public static int testIntAddConstant2(FieldObject f) { 3044 return f.intValue + intTestValue2; 3045 } 3046 3047 @Test 3048 public void testIntAdds() { 3049 FieldObject f = new FieldObject(); 3050 test("testIntAdd", f, intTestValue1); 3051 test("testIntAddConstant1", f); 3052 test("testIntAddConstant2", f); 3053 } 3054 3055 @Test 3056 public void testIntNullAdd() { 3057 test("testIntAdd", null, intTestValue1); 3058 } 3059 3060 public static long testLongAdd(FieldObject f, long longValue) { 3061 return f.longValue + longValue; 3062 } 3063 3064 public static long testLongAddConstant1(FieldObject f) { 3065 return f.longValue + longTestValue1; 3066 } 3067 3068 public static long testLongAddConstant2(FieldObject f) { 3069 return f.longValue + longTestValue2; 3070 } 3071 3072 @Test 3073 public void testLongAdds() { 3074 FieldObject f = new FieldObject(); 3075 test("testLongAdd", f, longTestValue1); 3076 test("testLongAddConstant1", f); 3077 test("testLongAddConstant2", f); 3078 } 3079 3080 @Test 3081 public void testLongNullAdd() { 3082 test("testLongAdd", null, longTestValue1); 3083 } 3084 3085 public static float testFloatAdd(FieldObject f, float floatValue) { 3086 return f.floatValue + floatValue; 3087 } 3088 3089 public static float testFloatAddConstant1(FieldObject f) { 3090 return f.floatValue + floatTestValue1; 3091 } 3092 3093 public static float testFloatAddConstant2(FieldObject f) { 3094 return f.floatValue + floatTestValue2; 3095 } 3096 3097 @Test 3098 public void testFloatAdds() { 3099 FieldObject f = new FieldObject(); 3100 test("testFloatAdd", f, floatTestValue1); 3101 test("testFloatAddConstant1", f); 3102 test("testFloatAddConstant2", f); 3103 } 3104 3105 @Test 3106 public void testFloatNullAdd() { 3107 test("testFloatAdd", null, floatTestValue1); 3108 } 3109 3110 public static double testDoubleAdd(FieldObject f, double doubleValue) { 3111 return f.doubleValue + doubleValue; 3112 } 3113 3114 public static double testDoubleAddConstant1(FieldObject f) { 3115 return f.doubleValue + doubleTestValue1; 3116 } 3117 3118 public static double testDoubleAddConstant2(FieldObject f) { 3119 return f.doubleValue + doubleTestValue2; 3120 } 3121 3122 @Test 3123 public void testDoubleAdds() { 3124 FieldObject f = new FieldObject(); 3125 test("testDoubleAdd", f, doubleTestValue1); 3126 test("testDoubleAddConstant1", f); 3127 test("testDoubleAddConstant2", f); 3128 } 3129 3130 @Test 3131 public void testDoubleNullAdd() { 3132 test("testDoubleAdd", null, doubleTestValue1); 3133 } 3134 3135 public static int testByteSub(FieldObject f, byte byteValue) { 3136 return f.byteValue - byteValue; 3137 } 3138 3139 public static int testByteSubConstant1(FieldObject f) { 3140 return f.byteValue - byteTestValue1; 3141 } 3142 3143 public static int testByteSubConstant2(FieldObject f) { 3144 return f.byteValue - byteTestValue2; 3145 } 3146 3147 @Test 3148 public void testByteSubs() { 3149 FieldObject f = new FieldObject(); 3150 test("testByteSub", f, byteTestValue1); 3151 test("testByteSubConstant1", f); 3152 test("testByteSubConstant2", f); 3153 } 3154 3155 @Test 3156 public void testByteNullSub() { 3157 test("testByteSub", null, byteTestValue1); 3158 } 3159 3160 public static int testShortSub(FieldObject f, short shortValue) { 3161 return f.shortValue - shortValue; 3162 } 3163 3164 public static int testShortSubConstant1(FieldObject f) { 3165 return f.shortValue - shortTestValue1; 3166 } 3167 3168 public static int testShortSubConstant2(FieldObject f) { 3169 return f.shortValue - shortTestValue2; 3170 } 3171 3172 @Test 3173 public void testShortSubs() { 3174 FieldObject f = new FieldObject(); 3175 test("testShortSub", f, shortTestValue1); 3176 test("testShortSubConstant1", f); 3177 test("testShortSubConstant2", f); 3178 } 3179 3180 @Test 3181 public void testShortNullSub() { 3182 test("testShortSub", null, shortTestValue1); 3183 } 3184 3185 public static int testCharSub(FieldObject f, char charValue) { 3186 return f.charValue - charValue; 3187 } 3188 3189 public static int testCharSubConstant1(FieldObject f) { 3190 return f.charValue - charTestValue1; 3191 } 3192 3193 public static int testCharSubConstant2(FieldObject f) { 3194 return f.charValue - charTestValue2; 3195 } 3196 3197 @Test 3198 public void testCharSubs() { 3199 FieldObject f = new FieldObject(); 3200 test("testCharSub", f, charTestValue1); 3201 test("testCharSubConstant1", f); 3202 test("testCharSubConstant2", f); 3203 } 3204 3205 @Test 3206 public void testCharNullSub() { 3207 test("testCharSub", null, charTestValue1); 3208 } 3209 3210 public static int testIntSub(FieldObject f, int intValue) { 3211 return f.intValue - intValue; 3212 } 3213 3214 public static int testIntSubConstant1(FieldObject f) { 3215 return f.intValue - intTestValue1; 3216 } 3217 3218 public static int testIntSubConstant2(FieldObject f) { 3219 return f.intValue - intTestValue2; 3220 } 3221 3222 @Test 3223 public void testIntSubs() { 3224 FieldObject f = new FieldObject(); 3225 test("testIntSub", f, intTestValue1); 3226 test("testIntSubConstant1", f); 3227 test("testIntSubConstant2", f); 3228 } 3229 3230 @Test 3231 public void testIntNullSub() { 3232 test("testIntSub", null, intTestValue1); 3233 } 3234 3235 public static long testLongSub(FieldObject f, long longValue) { 3236 return f.longValue - longValue; 3237 } 3238 3239 public static long testLongSubConstant1(FieldObject f) { 3240 return f.longValue - longTestValue1; 3241 } 3242 3243 public static long testLongSubConstant2(FieldObject f) { 3244 return f.longValue - longTestValue2; 3245 } 3246 3247 @Test 3248 public void testLongSubs() { 3249 FieldObject f = new FieldObject(); 3250 test("testLongSub", f, longTestValue1); 3251 test("testLongSubConstant1", f); 3252 test("testLongSubConstant2", f); 3253 } 3254 3255 @Test 3256 public void testLongNullSub() { 3257 test("testLongSub", null, longTestValue1); 3258 } 3259 3260 public static float testFloatSub(FieldObject f, float floatValue) { 3261 return f.floatValue - floatValue; 3262 } 3263 3264 public static float testFloatSubConstant1(FieldObject f) { 3265 return f.floatValue - floatTestValue1; 3266 } 3267 3268 public static float testFloatSubConstant2(FieldObject f) { 3269 return f.floatValue - floatTestValue2; 3270 } 3271 3272 @Test 3273 public void testFloatSubs() { 3274 FieldObject f = new FieldObject(); 3275 test("testFloatSub", f, floatTestValue1); 3276 test("testFloatSubConstant1", f); 3277 test("testFloatSubConstant2", f); 3278 } 3279 3280 @Test 3281 public void testFloatNullSub() { 3282 test("testFloatSub", null, floatTestValue1); 3283 } 3284 3285 public static double testDoubleSub(FieldObject f, double doubleValue) { 3286 return f.doubleValue - doubleValue; 3287 } 3288 3289 public static double testDoubleSubConstant1(FieldObject f) { 3290 return f.doubleValue - doubleTestValue1; 3291 } 3292 3293 public static double testDoubleSubConstant2(FieldObject f) { 3294 return f.doubleValue - doubleTestValue2; 3295 } 3296 3297 @Test 3298 public void testDoubleSubs() { 3299 FieldObject f = new FieldObject(); 3300 test("testDoubleSub", f, doubleTestValue1); 3301 test("testDoubleSubConstant1", f); 3302 test("testDoubleSubConstant2", f); 3303 } 3304 3305 @Test 3306 public void testDoubleNullSub() { 3307 test("testDoubleSub", null, doubleTestValue1); 3308 } 3309 3310 public static int testByteMul(FieldObject f, byte byteValue) { 3311 return f.byteValue * byteValue; 3312 } 3313 3314 public static int testByteMulConstant1(FieldObject f) { 3315 return f.byteValue * byteTestValue1; 3316 } 3317 3318 public static int testByteMulConstant2(FieldObject f) { 3319 return f.byteValue * byteTestValue2; 3320 } 3321 3322 @Test 3323 public void testByteMuls() { 3324 FieldObject f = new FieldObject(); 3325 test("testByteMul", f, byteTestValue1); 3326 test("testByteMulConstant1", f); 3327 test("testByteMulConstant2", f); 3328 } 3329 3330 @Test 3331 public void testByteNullMul() { 3332 test("testByteMul", null, byteTestValue1); 3333 } 3334 3335 public static int testShortMul(FieldObject f, short shortValue) { 3336 return f.shortValue * shortValue; 3337 } 3338 3339 public static int testShortMulConstant1(FieldObject f) { 3340 return f.shortValue * shortTestValue1; 3341 } 3342 3343 public static int testShortMulConstant2(FieldObject f) { 3344 return f.shortValue * shortTestValue2; 3345 } 3346 3347 @Test 3348 public void testShortMuls() { 3349 FieldObject f = new FieldObject(); 3350 test("testShortMul", f, shortTestValue1); 3351 test("testShortMulConstant1", f); 3352 test("testShortMulConstant2", f); 3353 } 3354 3355 @Test 3356 public void testShortNullMul() { 3357 test("testShortMul", null, shortTestValue1); 3358 } 3359 3360 public static int testCharMul(FieldObject f, char charValue) { 3361 return f.charValue * charValue; 3362 } 3363 3364 public static int testCharMulConstant1(FieldObject f) { 3365 return f.charValue * charTestValue1; 3366 } 3367 3368 public static int testCharMulConstant2(FieldObject f) { 3369 return f.charValue * charTestValue2; 3370 } 3371 3372 @Test 3373 public void testCharMuls() { 3374 FieldObject f = new FieldObject(); 3375 test("testCharMul", f, charTestValue1); 3376 test("testCharMulConstant1", f); 3377 test("testCharMulConstant2", f); 3378 } 3379 3380 @Test 3381 public void testCharNullMul() { 3382 test("testCharMul", null, charTestValue1); 3383 } 3384 3385 public static int testIntMul(FieldObject f, int intValue) { 3386 return f.intValue * intValue; 3387 } 3388 3389 public static int testIntMulConstant1(FieldObject f) { 3390 return f.intValue * intTestValue1; 3391 } 3392 3393 public static int testIntMulConstant2(FieldObject f) { 3394 return f.intValue * intTestValue2; 3395 } 3396 3397 @Test 3398 public void testIntMuls() { 3399 FieldObject f = new FieldObject(); 3400 test("testIntMul", f, intTestValue1); 3401 test("testIntMulConstant1", f); 3402 test("testIntMulConstant2", f); 3403 } 3404 3405 @Test 3406 public void testIntNullMul() { 3407 test("testIntMul", null, intTestValue1); 3408 } 3409 3410 public static long testLongMul(FieldObject f, long longValue) { 3411 return f.longValue * longValue; 3412 } 3413 3414 public static long testLongMulConstant1(FieldObject f) { 3415 return f.longValue * longTestValue1; 3416 } 3417 3418 public static long testLongMulConstant2(FieldObject f) { 3419 return f.longValue * longTestValue2; 3420 } 3421 3422 @Test 3423 public void testLongMuls() { 3424 FieldObject f = new FieldObject(); 3425 test("testLongMul", f, longTestValue1); 3426 test("testLongMulConstant1", f); 3427 test("testLongMulConstant2", f); 3428 } 3429 3430 @Test 3431 public void testLongNullMul() { 3432 test("testLongMul", null, longTestValue1); 3433 } 3434 3435 public static float testFloatMul(FieldObject f, float floatValue) { 3436 return f.floatValue * floatValue; 3437 } 3438 3439 public static float testFloatMulConstant1(FieldObject f) { 3440 return f.floatValue * floatTestValue1; 3441 } 3442 3443 public static float testFloatMulConstant2(FieldObject f) { 3444 return f.floatValue * floatTestValue2; 3445 } 3446 3447 @Test 3448 public void testFloatMuls() { 3449 FieldObject f = new FieldObject(); 3450 test("testFloatMul", f, floatTestValue1); 3451 test("testFloatMulConstant1", f); 3452 test("testFloatMulConstant2", f); 3453 } 3454 3455 @Test 3456 public void testFloatNullMul() { 3457 test("testFloatMul", null, floatTestValue1); 3458 } 3459 3460 public static double testDoubleMul(FieldObject f, double doubleValue) { 3461 return f.doubleValue * doubleValue; 3462 } 3463 3464 public static double testDoubleMulConstant1(FieldObject f) { 3465 return f.doubleValue * doubleTestValue1; 3466 } 3467 3468 public static double testDoubleMulConstant2(FieldObject f) { 3469 return f.doubleValue * doubleTestValue2; 3470 } 3471 3472 @Test 3473 public void testDoubleMuls() { 3474 FieldObject f = new FieldObject(); 3475 test("testDoubleMul", f, doubleTestValue1); 3476 test("testDoubleMulConstant1", f); 3477 test("testDoubleMulConstant2", f); 3478 } 3479 3480 @Test 3481 public void testDoubleNullMul() { 3482 test("testDoubleMul", null, doubleTestValue1); 3483 } 3484 3485 public static int testByteDiv(FieldObject f, byte byteValue) { 3486 return f.byteValue / byteValue; 3487 } 3488 3489 public static int testByteDivConstant1(FieldObject f) { 3490 return f.byteValue / byteTestValue1; 3491 } 3492 3493 public static int testByteDivConstant2(FieldObject f) { 3494 return f.byteValue / byteTestValue2; 3495 } 3496 3497 @Test 3498 public void testByteDivs() { 3499 FieldObject f = new FieldObject(); 3500 test("testByteDiv", f, byteTestValue1); 3501 test("testByteDivConstant1", f); 3502 test("testByteDivConstant2", f); 3503 } 3504 3505 @Test 3506 public void testByteNullDiv() { 3507 test("testByteDiv", null, byteTestValue1); 3508 } 3509 3510 public static int testShortDiv(FieldObject f, short shortValue) { 3511 return f.shortValue / shortValue; 3512 } 3513 3514 public static int testShortDivConstant1(FieldObject f) { 3515 return f.shortValue / shortTestValue1; 3516 } 3517 3518 public static int testShortDivConstant2(FieldObject f) { 3519 return f.shortValue / shortTestValue2; 3520 } 3521 3522 @Test 3523 public void testShortDivs() { 3524 FieldObject f = new FieldObject(); 3525 test("testShortDiv", f, shortTestValue1); 3526 test("testShortDivConstant1", f); 3527 test("testShortDivConstant2", f); 3528 } 3529 3530 @Test 3531 public void testShortNullDiv() { 3532 test("testShortDiv", null, shortTestValue1); 3533 } 3534 3535 public static int testCharDiv(FieldObject f, char charValue) { 3536 return f.charValue / charValue; 3537 } 3538 3539 public static int testCharDivConstant1(FieldObject f) { 3540 return f.charValue / charTestValue1; 3541 } 3542 3543 public static int testCharDivConstant2(FieldObject f) { 3544 return f.charValue / charTestValue2; 3545 } 3546 3547 @Test 3548 public void testCharDivs() { 3549 FieldObject f = new FieldObject(); 3550 test("testCharDiv", f, charTestValue1); 3551 test("testCharDivConstant1", f); 3552 test("testCharDivConstant2", f); 3553 } 3554 3555 @Test 3556 public void testCharNullDiv() { 3557 test("testCharDiv", null, charTestValue1); 3558 } 3559 3560 public static int testIntDiv(FieldObject f, int intValue) { 3561 return f.intValue / intValue; 3562 } 3563 3564 public static int testIntDivConstant1(FieldObject f) { 3565 return f.intValue / intTestValue1; 3566 } 3567 3568 public static int testIntDivConstant2(FieldObject f) { 3569 return f.intValue / intTestValue2; 3570 } 3571 3572 @Test 3573 public void testIntDivs() { 3574 FieldObject f = new FieldObject(); 3575 test("testIntDiv", f, intTestValue1); 3576 test("testIntDivConstant1", f); 3577 test("testIntDivConstant2", f); 3578 } 3579 3580 @Test 3581 public void testIntNullDiv() { 3582 test("testIntDiv", null, intTestValue1); 3583 } 3584 3585 public static long testLongDiv(FieldObject f, long longValue) { 3586 return f.longValue / longValue; 3587 } 3588 3589 public static long testLongDivConstant1(FieldObject f) { 3590 return f.longValue / longTestValue1; 3591 } 3592 3593 public static long testLongDivConstant2(FieldObject f) { 3594 return f.longValue / longTestValue2; 3595 } 3596 3597 @Test 3598 public void testLongDivs() { 3599 FieldObject f = new FieldObject(); 3600 test("testLongDiv", f, longTestValue1); 3601 test("testLongDivConstant1", f); 3602 test("testLongDivConstant2", f); 3603 } 3604 3605 @Test 3606 public void testLongNullDiv() { 3607 test("testLongDiv", null, longTestValue1); 3608 } 3609 3610 public static float testFloatDiv(FieldObject f, float floatValue) { 3611 return f.floatValue / floatValue; 3612 } 3613 3614 public static float testFloatDivConstant1(FieldObject f) { 3615 return f.floatValue / floatTestValue1; 3616 } 3617 3618 public static float testFloatDivConstant2(FieldObject f) { 3619 return f.floatValue / floatTestValue2; 3620 } 3621 3622 @Test 3623 public void testFloatDivs() { 3624 FieldObject f = new FieldObject(); 3625 test("testFloatDiv", f, floatTestValue1); 3626 test("testFloatDivConstant1", f); 3627 test("testFloatDivConstant2", f); 3628 } 3629 3630 @Test 3631 public void testFloatNullDiv() { 3632 test("testFloatDiv", null, floatTestValue1); 3633 } 3634 3635 public static double testDoubleDiv(FieldObject f, double doubleValue) { 3636 return f.doubleValue / doubleValue; 3637 } 3638 3639 public static double testDoubleDivConstant1(FieldObject f) { 3640 return f.doubleValue / doubleTestValue1; 3641 } 3642 3643 public static double testDoubleDivConstant2(FieldObject f) { 3644 return f.doubleValue / doubleTestValue2; 3645 } 3646 3647 @Test 3648 public void testDoubleDivs() { 3649 FieldObject f = new FieldObject(); 3650 test("testDoubleDiv", f, doubleTestValue1); 3651 test("testDoubleDivConstant1", f); 3652 test("testDoubleDivConstant2", f); 3653 } 3654 3655 @Test 3656 public void testDoubleNullDiv() { 3657 test("testDoubleDiv", null, doubleTestValue1); 3658 } 3659 3660 public static int testByteOr(FieldObject f, byte byteValue) { 3661 return f.byteValue | byteValue; 3662 } 3663 3664 public static int testByteOrConstant1(FieldObject f) { 3665 return f.byteValue | byteTestValue1; 3666 } 3667 3668 public static int testByteOrConstant2(FieldObject f) { 3669 return f.byteValue | byteTestValue2; 3670 } 3671 3672 @Test 3673 public void testByteOrs() { 3674 FieldObject f = new FieldObject(); 3675 test("testByteOr", f, byteTestValue1); 3676 test("testByteOrConstant1", f); 3677 test("testByteOrConstant2", f); 3678 } 3679 3680 @Test 3681 public void testByteNullOr() { 3682 test("testByteOr", null, byteTestValue1); 3683 } 3684 3685 public static int testShortOr(FieldObject f, short shortValue) { 3686 return f.shortValue | shortValue; 3687 } 3688 3689 public static int testShortOrConstant1(FieldObject f) { 3690 return f.shortValue | shortTestValue1; 3691 } 3692 3693 public static int testShortOrConstant2(FieldObject f) { 3694 return f.shortValue | shortTestValue2; 3695 } 3696 3697 @Test 3698 public void testShortOrs() { 3699 FieldObject f = new FieldObject(); 3700 test("testShortOr", f, shortTestValue1); 3701 test("testShortOrConstant1", f); 3702 test("testShortOrConstant2", f); 3703 } 3704 3705 @Test 3706 public void testShortNullOr() { 3707 test("testShortOr", null, shortTestValue1); 3708 } 3709 3710 public static int testCharOr(FieldObject f, char charValue) { 3711 return f.charValue | charValue; 3712 } 3713 3714 public static int testCharOrConstant1(FieldObject f) { 3715 return f.charValue | charTestValue1; 3716 } 3717 3718 public static int testCharOrConstant2(FieldObject f) { 3719 return f.charValue | charTestValue2; 3720 } 3721 3722 @Test 3723 public void testCharOrs() { 3724 FieldObject f = new FieldObject(); 3725 test("testCharOr", f, charTestValue1); 3726 test("testCharOrConstant1", f); 3727 test("testCharOrConstant2", f); 3728 } 3729 3730 @Test 3731 public void testCharNullOr() { 3732 test("testCharOr", null, charTestValue1); 3733 } 3734 3735 public static int testIntOr(FieldObject f, int intValue) { 3736 return f.intValue | intValue; 3737 } 3738 3739 public static int testIntOrConstant1(FieldObject f) { 3740 return f.intValue | intTestValue1; 3741 } 3742 3743 public static int testIntOrConstant2(FieldObject f) { 3744 return f.intValue | intTestValue2; 3745 } 3746 3747 @Test 3748 public void testIntOrs() { 3749 FieldObject f = new FieldObject(); 3750 test("testIntOr", f, intTestValue1); 3751 test("testIntOrConstant1", f); 3752 test("testIntOrConstant2", f); 3753 } 3754 3755 @Test 3756 public void testIntNullOr() { 3757 test("testIntOr", null, intTestValue1); 3758 } 3759 3760 public static long testLongOr(FieldObject f, long longValue) { 3761 return f.longValue | longValue; 3762 } 3763 3764 public static long testLongOrConstant1(FieldObject f) { 3765 return f.longValue | longTestValue1; 3766 } 3767 3768 public static long testLongOrConstant2(FieldObject f) { 3769 return f.longValue | longTestValue2; 3770 } 3771 3772 @Test 3773 public void testLongOrs() { 3774 FieldObject f = new FieldObject(); 3775 test("testLongOr", f, longTestValue1); 3776 test("testLongOrConstant1", f); 3777 test("testLongOrConstant2", f); 3778 } 3779 3780 @Test 3781 public void testLongNullOr() { 3782 test("testLongOr", null, longTestValue1); 3783 } 3784 3785 public static int testByteXor(FieldObject f, byte byteValue) { 3786 return f.byteValue ^ byteValue; 3787 } 3788 3789 public static int testByteXorConstant1(FieldObject f) { 3790 return f.byteValue ^ byteTestValue1; 3791 } 3792 3793 public static int testByteXorConstant2(FieldObject f) { 3794 return f.byteValue ^ byteTestValue2; 3795 } 3796 3797 @Test 3798 public void testByteXors() { 3799 FieldObject f = new FieldObject(); 3800 test("testByteXor", f, byteTestValue1); 3801 test("testByteXorConstant1", f); 3802 test("testByteXorConstant2", f); 3803 } 3804 3805 @Test 3806 public void testByteNullXor() { 3807 test("testByteXor", null, byteTestValue1); 3808 } 3809 3810 public static int testShortXor(FieldObject f, short shortValue) { 3811 return f.shortValue ^ shortValue; 3812 } 3813 3814 public static int testShortXorConstant1(FieldObject f) { 3815 return f.shortValue ^ shortTestValue1; 3816 } 3817 3818 public static int testShortXorConstant2(FieldObject f) { 3819 return f.shortValue ^ shortTestValue2; 3820 } 3821 3822 @Test 3823 public void testShortXors() { 3824 FieldObject f = new FieldObject(); 3825 test("testShortXor", f, shortTestValue1); 3826 test("testShortXorConstant1", f); 3827 test("testShortXorConstant2", f); 3828 } 3829 3830 @Test 3831 public void testShortNullXor() { 3832 test("testShortXor", null, shortTestValue1); 3833 } 3834 3835 public static int testCharXor(FieldObject f, char charValue) { 3836 return f.charValue ^ charValue; 3837 } 3838 3839 public static int testCharXorConstant1(FieldObject f) { 3840 return f.charValue ^ charTestValue1; 3841 } 3842 3843 public static int testCharXorConstant2(FieldObject f) { 3844 return f.charValue ^ charTestValue2; 3845 } 3846 3847 @Test 3848 public void testCharXors() { 3849 FieldObject f = new FieldObject(); 3850 test("testCharXor", f, charTestValue1); 3851 test("testCharXorConstant1", f); 3852 test("testCharXorConstant2", f); 3853 } 3854 3855 @Test 3856 public void testCharNullXor() { 3857 test("testCharXor", null, charTestValue1); 3858 } 3859 3860 public static int testIntXor(FieldObject f, int intValue) { 3861 return f.intValue ^ intValue; 3862 } 3863 3864 public static int testIntXorConstant1(FieldObject f) { 3865 return f.intValue ^ intTestValue1; 3866 } 3867 3868 public static int testIntXorConstant2(FieldObject f) { 3869 return f.intValue ^ intTestValue2; 3870 } 3871 3872 @Test 3873 public void testIntXors() { 3874 FieldObject f = new FieldObject(); 3875 test("testIntXor", f, intTestValue1); 3876 test("testIntXorConstant1", f); 3877 test("testIntXorConstant2", f); 3878 } 3879 3880 @Test 3881 public void testIntNullXor() { 3882 test("testIntXor", null, intTestValue1); 3883 } 3884 3885 public static long testLongXor(FieldObject f, long longValue) { 3886 return f.longValue ^ longValue; 3887 } 3888 3889 public static long testLongXorConstant1(FieldObject f) { 3890 return f.longValue ^ longTestValue1; 3891 } 3892 3893 public static long testLongXorConstant2(FieldObject f) { 3894 return f.longValue ^ longTestValue2; 3895 } 3896 3897 @Test 3898 public void testLongXors() { 3899 FieldObject f = new FieldObject(); 3900 test("testLongXor", f, longTestValue1); 3901 test("testLongXorConstant1", f); 3902 test("testLongXorConstant2", f); 3903 } 3904 3905 @Test 3906 public void testLongNullXor() { 3907 test("testLongXor", null, longTestValue1); 3908 } 3909 3910 public static int testByteAnd(FieldObject f, byte byteValue) { 3911 return f.byteValue & byteValue; 3912 } 3913 3914 public static int testByteAndConstant1(FieldObject f) { 3915 return f.byteValue & byteTestValue1; 3916 } 3917 3918 public static int testByteAndConstant2(FieldObject f) { 3919 return f.byteValue & byteTestValue2; 3920 } 3921 3922 @Test 3923 public void testByteAnds() { 3924 FieldObject f = new FieldObject(); 3925 test("testByteAnd", f, byteTestValue1); 3926 test("testByteAndConstant1", f); 3927 test("testByteAndConstant2", f); 3928 } 3929 3930 @Test 3931 public void testByteNullAnd() { 3932 test("testByteAnd", null, byteTestValue1); 3933 } 3934 3935 public static int testShortAnd(FieldObject f, short shortValue) { 3936 return f.shortValue & shortValue; 3937 } 3938 3939 public static int testShortAndConstant1(FieldObject f) { 3940 return f.shortValue & shortTestValue1; 3941 } 3942 3943 public static int testShortAndConstant2(FieldObject f) { 3944 return f.shortValue & shortTestValue2; 3945 } 3946 3947 @Test 3948 public void testShortAnds() { 3949 FieldObject f = new FieldObject(); 3950 test("testShortAnd", f, shortTestValue1); 3951 test("testShortAndConstant1", f); 3952 test("testShortAndConstant2", f); 3953 } 3954 3955 @Test 3956 public void testShortNullAnd() { 3957 test("testShortAnd", null, shortTestValue1); 3958 } 3959 3960 public static int testCharAnd(FieldObject f, char charValue) { 3961 return f.charValue & charValue; 3962 } 3963 3964 public static int testCharAndConstant1(FieldObject f) { 3965 return f.charValue & charTestValue1; 3966 } 3967 3968 public static int testCharAndConstant2(FieldObject f) { 3969 return f.charValue & charTestValue2; 3970 } 3971 3972 @Test 3973 public void testCharAnds() { 3974 FieldObject f = new FieldObject(); 3975 test("testCharAnd", f, charTestValue1); 3976 test("testCharAndConstant1", f); 3977 test("testCharAndConstant2", f); 3978 } 3979 3980 @Test 3981 public void testCharNullAnd() { 3982 test("testCharAnd", null, charTestValue1); 3983 } 3984 3985 public static int testIntAnd(FieldObject f, int intValue) { 3986 return f.intValue & intValue; 3987 } 3988 3989 public static int testIntAndConstant1(FieldObject f) { 3990 return f.intValue & intTestValue1; 3991 } 3992 3993 public static int testIntAndConstant2(FieldObject f) { 3994 return f.intValue & intTestValue2; 3995 } 3996 3997 @Test 3998 public void testIntAnds() { 3999 FieldObject f = new FieldObject(); 4000 test("testIntAnd", f, intTestValue1); 4001 test("testIntAndConstant1", f); 4002 test("testIntAndConstant2", f); 4003 } 4004 4005 @Test 4006 public void testIntNullAnd() { 4007 test("testIntAnd", null, intTestValue1); 4008 } 4009 4010 public static long testLongAnd(FieldObject f, long longValue) { 4011 return f.longValue & longValue; 4012 } 4013 4014 public static long testLongAndConstant1(FieldObject f) { 4015 return f.longValue & longTestValue1; 4016 } 4017 4018 public static long testLongAndConstant2(FieldObject f) { 4019 return f.longValue & longTestValue2; 4020 } 4021 4022 @Test 4023 public void testLongAnds() { 4024 FieldObject f = new FieldObject(); 4025 test("testLongAnd", f, longTestValue1); 4026 test("testLongAndConstant1", f); 4027 test("testLongAndConstant2", f); 4028 } 4029 4030 @Test 4031 public void testLongNullAnd() { 4032 test("testLongAnd", null, longTestValue1); 4033 } 4034 4035 public static boolean testIntMask(FieldObject f, int intValue) { 4036 if ((f.intValue & intValue) != 0) { 4037 count++; 4038 return false; 4039 } 4040 return true; 4041 } 4042 4043 public static boolean testIntMaskConstant1(FieldObject f) { 4044 return (f.intValue & intTestValue1) != 0; 4045 } 4046 4047 public static boolean testIntMaskConstant2(FieldObject f) { 4048 return (f.intValue & intTestValue2) != 0; 4049 } 4050 4051 @Test 4052 public void testIntMasks() { 4053 FieldObject f = new FieldObject(); 4054 test("testIntMask", f, intTestValue1); 4055 test("testIntMaskConstant1", f); 4056 test("testIntMaskConstant2", f); 4057 } 4058 4059 @Test 4060 public void testIntNullMask() { 4061 test("testIntMask", null, intTestValue1); 4062 } 4063 4064 public static boolean testLongMask(FieldObject f, long longValue) { 4065 if ((f.longValue & longValue) != 0) { 4066 count++; 4067 return false; 4068 } 4069 return true; 4070 } 4071 4072 public static boolean testLongMaskConstant1(FieldObject f) { 4073 return (f.longValue & longTestValue1) != 0; 4074 } 4075 4076 public static boolean testLongMaskConstant2(FieldObject f) { 4077 return (f.longValue & longTestValue2) != 0; 4078 } 4079 4080 @Test 4081 public void testLongMasks() { 4082 FieldObject f = new FieldObject(); 4083 test("testLongMask", f, longTestValue1); 4084 test("testLongMaskConstant1", f); 4085 test("testLongMaskConstant2", f); 4086 } 4087 4088 @Test 4089 public void testLongNullMask() { 4090 test("testLongMask", null, longTestValue1); 4091 } 4092 4093 public static int doConvertByteInt(FieldObject f) { 4094 return f.byteValue; 4095 } 4096 4097 @Test 4098 public void testConvertByteInt() { 4099 test("doConvertByteInt", maxObject); 4100 test("doConvertByteInt", (FieldObject) null); 4101 } 4102 4103 public static int doConvertShortInt(FieldObject f) { 4104 return f.shortValue; 4105 } 4106 4107 @Test 4108 public void testConvertShortInt() { 4109 test("doConvertShortInt", maxObject); 4110 test("doConvertShortInt", (FieldObject) null); 4111 } 4112 4113 public static int doConvertCharInt(FieldObject f) { 4114 return f.charValue; 4115 } 4116 4117 @Test 4118 public void testConvertCharInt() { 4119 test("doConvertCharInt", maxObject); 4120 test("doConvertCharInt", (FieldObject) null); 4121 } 4122 4123 public static int doConvertLongInt(FieldObject f) { 4124 return (int) f.longValue; 4125 } 4126 4127 @Test 4128 public void testConvertLongInt() { 4129 test("doConvertLongInt", maxObject); 4130 test("doConvertLongInt", (FieldObject) null); 4131 } 4132 4133 public static int doConvertFloatInt(FieldObject f) { 4134 return (int) f.floatValue; 4135 } 4136 4137 @Test 4138 public void testConvertFloatInt() { 4139 test("doConvertFloatInt", maxObject); 4140 test("doConvertFloatInt", (FieldObject) null); 4141 } 4142 4143 public static int doConvertDoubleInt(FieldObject f) { 4144 return (int) f.doubleValue; 4145 } 4146 4147 @Test 4148 public void testConvertDoubleInt() { 4149 test("doConvertDoubleInt", maxObject); 4150 test("doConvertDoubleInt", (FieldObject) null); 4151 } 4152 4153 public static long doConvertByteLong(FieldObject f) { 4154 return f.byteValue; 4155 } 4156 4157 @Test 4158 public void testConvertByteLong() { 4159 test("doConvertByteLong", maxObject); 4160 test("doConvertByteLong", (FieldObject) null); 4161 } 4162 4163 public static long doConvertShortLong(FieldObject f) { 4164 return f.shortValue; 4165 } 4166 4167 @Test 4168 public void testConvertShortLong() { 4169 test("doConvertShortLong", maxObject); 4170 test("doConvertShortLong", (FieldObject) null); 4171 } 4172 4173 public static long doConvertCharLong(FieldObject f) { 4174 return f.charValue; 4175 } 4176 4177 @Test 4178 public void testConvertCharLong() { 4179 test("doConvertCharLong", maxObject); 4180 test("doConvertCharLong", (FieldObject) null); 4181 } 4182 4183 public static long doConvertIntLong(FieldObject f) { 4184 return f.intValue; 4185 } 4186 4187 @Test 4188 public void testConvertIntLong() { 4189 test("doConvertIntLong", maxObject); 4190 test("doConvertIntLong", (FieldObject) null); 4191 } 4192 4193 public static long doConvertFloatLong(FieldObject f) { 4194 return (long) f.floatValue; 4195 } 4196 4197 @Test 4198 public void testConvertFloatLong() { 4199 test("doConvertFloatLong", maxObject); 4200 test("doConvertFloatLong", (FieldObject) null); 4201 } 4202 4203 public static long doConvertDoubleLong(FieldObject f) { 4204 return (long) f.doubleValue; 4205 } 4206 4207 @Test 4208 public void testConvertDoubleLong() { 4209 test("doConvertDoubleLong", maxObject); 4210 test("doConvertDoubleLong", (FieldObject) null); 4211 } 4212 4213 public static float doConvertByteFloat(FieldObject f) { 4214 return f.byteValue; 4215 } 4216 4217 @Test 4218 public void testConvertByteFloat() { 4219 test("doConvertByteFloat", maxObject); 4220 test("doConvertByteFloat", (FieldObject) null); 4221 } 4222 4223 public static float doConvertShortFloat(FieldObject f) { 4224 return f.shortValue; 4225 } 4226 4227 @Test 4228 public void testConvertShortFloat() { 4229 test("doConvertShortFloat", maxObject); 4230 test("doConvertShortFloat", (FieldObject) null); 4231 } 4232 4233 public static float doConvertCharFloat(FieldObject f) { 4234 return f.charValue; 4235 } 4236 4237 @Test 4238 public void testConvertCharFloat() { 4239 test("doConvertCharFloat", maxObject); 4240 test("doConvertCharFloat", (FieldObject) null); 4241 } 4242 4243 public static float doConvertIntFloat(FieldObject f) { 4244 return f.intValue; 4245 } 4246 4247 @Test 4248 public void testConvertIntFloat() { 4249 test("doConvertIntFloat", maxObject); 4250 test("doConvertIntFloat", (FieldObject) null); 4251 } 4252 4253 public static float doConvertLongFloat(FieldObject f) { 4254 return f.longValue; 4255 } 4256 4257 @Test 4258 public void testConvertLongFloat() { 4259 test("doConvertLongFloat", maxObject); 4260 test("doConvertLongFloat", (FieldObject) null); 4261 } 4262 4263 public static float doConvertDoubleFloat(FieldObject f) { 4264 return (float) f.doubleValue; 4265 } 4266 4267 @Test 4268 public void testConvertDoubleFloat() { 4269 test("doConvertDoubleFloat", maxObject); 4270 test("doConvertDoubleFloat", (FieldObject) null); 4271 } 4272 4273 public static double doConvertByteDouble(FieldObject f) { 4274 return f.byteValue; 4275 } 4276 4277 @Test 4278 public void testConvertByteDouble() { 4279 test("doConvertByteDouble", maxObject); 4280 test("doConvertByteDouble", (FieldObject) null); 4281 } 4282 4283 public static double doConvertShortDouble(FieldObject f) { 4284 return f.shortValue; 4285 } 4286 4287 @Test 4288 public void testConvertShortDouble() { 4289 test("doConvertShortDouble", maxObject); 4290 test("doConvertShortDouble", (FieldObject) null); 4291 } 4292 4293 public static double doConvertCharDouble(FieldObject f) { 4294 return f.charValue; 4295 } 4296 4297 @Test 4298 public void testConvertCharDouble() { 4299 test("doConvertCharDouble", maxObject); 4300 test("doConvertCharDouble", (FieldObject) null); 4301 } 4302 4303 public static double doConvertIntDouble(FieldObject f) { 4304 return f.intValue; 4305 } 4306 4307 @Test 4308 public void testConvertIntDouble() { 4309 test("doConvertIntDouble", maxObject); 4310 test("doConvertIntDouble", (FieldObject) null); 4311 } 4312 4313 public static double doConvertLongDouble(FieldObject f) { 4314 return f.longValue; 4315 } 4316 4317 @Test 4318 public void testConvertLongDouble() { 4319 test("doConvertLongDouble", maxObject); 4320 test("doConvertLongDouble", (FieldObject) null); 4321 } 4322 4323 public static double doConvertFloatDouble(FieldObject f) { 4324 return f.floatValue; 4325 } 4326 4327 @Test 4328 public void testConvertFloatDouble() { 4329 test("doConvertFloatDouble", maxObject); 4330 test("doConvertFloatDouble", (FieldObject) null); 4331 } 4332}