langtools/test/tools/javac/boxing/T6348760.java
author mikejwre
Wed, 09 Jun 2010 18:56:41 -0700
changeset 5634 895b66935810
parent 5520 86e4b9a9da40
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
     2
 * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 10
diff changeset
    21
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    23
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
/*
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
 * @test
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
 * @bug     6348760
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
 * @summary crash: java.lang.AssertionError at com.sun.tools.javac.comp.Lower.abstractLval(Lower.java:1853)
06bc494ca11e Initial load
duke
parents:
diff changeset
    28
 * @author  Peter von der Ah\u00e9
06bc494ca11e Initial load
duke
parents:
diff changeset
    29
 * @run main/othervm -Xfuture T6348760
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    31
06bc494ca11e Initial load
duke
parents:
diff changeset
    32
public class T6348760<T> {
06bc494ca11e Initial load
duke
parents:
diff changeset
    33
    T value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
    static int n;
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
    T6348760(T value) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
        this.value = value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
    static void testByte(T6348760<Byte> i, T6348760<Byte> j, T6348760<Boolean> a) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
        i.value++;
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
        i.value--;
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
        ++i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
        --i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
        n = +i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    46
        n = -i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
        n = ~i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
        n = i.value * j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    49
        n = i.value / j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
        n = i.value % j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
        n = i.value + j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
        n = i.value - j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
        n = i.value << j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
        n = i.value >> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    55
        n = i.value >>> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    56
        n = i.value & j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
        n = i.value ^ j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
        n = i.value | j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    59
        n *= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
        n /= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
        n %= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    62
        n += j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
        n -= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
        n <<= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
        n >>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
        n >>>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
        n &= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
        n ^= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
        n |= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
        a.value = i.value < j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
        a.value = i.value > j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
        a.value = i.value <= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    73
        a.value = i.value >= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    74
        a.value = i.value == j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    75
        a.value = i.value != j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    77
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
    static void testShort(T6348760<Short> i, T6348760<Short> j, T6348760<Boolean> a) {
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
        i.value++;
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
        i.value--;
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
        ++i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
        --i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
        n = +i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
        n = -i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    85
        n = ~i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    86
        n = i.value * j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
        n = i.value / j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    88
        n = i.value % j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    89
        n = i.value + j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    90
        n = i.value - j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    91
        n = i.value << j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    92
        n = i.value >> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    93
        n = i.value >>> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    94
        n = i.value & j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    95
        n = i.value ^ j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    96
        n = i.value | j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
        n *= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
        n /= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
    99
        n %= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   100
        n += j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   101
        n -= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   102
        n <<= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
        n >>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
        n >>>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
        n &= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   106
        n ^= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
        n |= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
        a.value = i.value < j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
        a.value = i.value > j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
        a.value = i.value <= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
        a.value = i.value >= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
        a.value = i.value == j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
        a.value = i.value != j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   114
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   115
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
    static void testInteger(T6348760<Integer> i, T6348760<Integer> j, T6348760<Boolean> a) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   117
        i.value++;
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
        i.value--;
06bc494ca11e Initial load
duke
parents:
diff changeset
   119
        ++i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   120
        --i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   121
        i.value = +i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   122
        i.value = -i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
        i.value = ~i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
        i.value = i.value * j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   125
        i.value = i.value / j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   126
        i.value = i.value % j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   127
        i.value = i.value + j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   128
        i.value = i.value - j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
        i.value = i.value << j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
        i.value = i.value >> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
        i.value = i.value >>> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   132
        i.value = i.value & j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
        i.value = i.value ^ j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
        i.value = i.value | j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
        i.value *= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
        i.value /= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
        i.value %= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   138
        i.value += j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   139
        i.value -= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   140
        i.value <<= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   141
        i.value >>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   142
        i.value >>>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   143
        i.value &= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
        i.value ^= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   145
        i.value |= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
        a.value = i.value < j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   147
        a.value = i.value > j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
        a.value = i.value <= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
        a.value = i.value >= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
        a.value = i.value == j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
        a.value = i.value != j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   153
06bc494ca11e Initial load
duke
parents:
diff changeset
   154
    static void testLong(T6348760<Long> i, T6348760<Long> j, T6348760<Boolean> a) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   155
        i.value++;
06bc494ca11e Initial load
duke
parents:
diff changeset
   156
        i.value--;
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
        ++i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
        --i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
        i.value = +i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
        i.value = -i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
        i.value = ~i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   162
        i.value = i.value * j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   163
        i.value = i.value / j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   164
        i.value = i.value % j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   165
        i.value = i.value + j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   166
        i.value = i.value - j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   167
        i.value = i.value << j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   168
        i.value = i.value >> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
        i.value = i.value >>> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
        i.value = i.value & j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
        i.value = i.value ^ j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
        i.value = i.value | j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
        i.value *= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   174
        i.value /= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   175
        i.value %= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   176
        i.value += j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   177
        i.value -= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   178
        i.value <<= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   179
        i.value >>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   180
        i.value >>>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   181
        i.value &= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   182
        i.value ^= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   183
        i.value |= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   184
        a.value = i.value < j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   185
        a.value = i.value > j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   186
        a.value = i.value <= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   187
        a.value = i.value >= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   188
        a.value = i.value == j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   189
        a.value = i.value != j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   190
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   191
06bc494ca11e Initial load
duke
parents:
diff changeset
   192
    static void testCharacter(T6348760<Character> i, T6348760<Character> j, T6348760<Boolean> a) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   193
        i.value++;
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
        i.value--;
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
        ++i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
        --i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
        n = +i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
        n = -i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   199
        n = ~i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   200
        n = i.value * j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
        n = i.value / j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   202
        n = i.value % j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   203
        n = i.value + j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   204
        n = i.value - j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
        n = i.value << j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
        n = i.value >> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
        n = i.value >>> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
        n = i.value & j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
        n = i.value ^ j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   210
        n = i.value | j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   211
        n *= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   212
        n /= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   213
        n %= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   214
        n += j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   215
        n -= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   216
        n <<= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   217
        n >>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
        n >>>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
        n &= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
        n ^= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   221
        n |= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
        a.value = i.value < j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   223
        a.value = i.value > j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   224
        a.value = i.value <= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   225
        a.value = i.value >= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   226
        a.value = i.value == j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   227
        a.value = i.value != j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
06bc494ca11e Initial load
duke
parents:
diff changeset
   230
    static void testFloat(T6348760<Float> i, T6348760<Float> j, T6348760<Boolean> a) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   231
        i.value++;
06bc494ca11e Initial load
duke
parents:
diff changeset
   232
        i.value--;
06bc494ca11e Initial load
duke
parents:
diff changeset
   233
        ++i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   234
        --i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   235
        i.value = +i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   236
        i.value = -i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   237
        // i.value = ~i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   238
        i.value = i.value * j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
        i.value = i.value / j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
        i.value = i.value % j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   241
        i.value = i.value + j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   242
        i.value = i.value - j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   243
        // i.value = i.value << j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   244
        // i.value = i.value >> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
        // i.value = i.value >>> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   246
        // i.value = i.value & j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
        // i.value = i.value ^ j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
        // i.value = i.value | j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
        i.value *= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
        i.value /= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   251
        i.value %= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   252
        i.value += j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
        i.value -= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   254
        // i.value <<= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
        // i.value >>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
        // i.value >>>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   257
        // i.value &= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
        // i.value ^= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   259
        // i.value |= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   260
        a.value = i.value < j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   261
        a.value = i.value > j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   262
        a.value = i.value <= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   263
        a.value = i.value >= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
        a.value = i.value == j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
        a.value = i.value != j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
    static void testDouble(T6348760<Double> i, T6348760<Double> j, T6348760<Boolean> a) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   269
        i.value++;
06bc494ca11e Initial load
duke
parents:
diff changeset
   270
        i.value--;
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
        ++i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   272
        --i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   273
        i.value = +i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   274
        i.value = -i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   275
        // i.value = ~i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
        i.value = i.value * j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
        i.value = i.value / j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   278
        i.value = i.value % j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
        i.value = i.value + j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
        i.value = i.value - j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   281
        // i.value = i.value << j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   282
        // i.value = i.value >> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   283
        // i.value = i.value >>> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
        // i.value = i.value & j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   285
        // i.value = i.value ^ j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   286
        // i.value = i.value | j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   287
        i.value *= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   288
        i.value /= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   289
        i.value %= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   290
        i.value += j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   291
        i.value -= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   292
        // i.value <<= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   293
        // i.value >>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   294
        // i.value >>>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   295
        // i.value &= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   296
        // i.value ^= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   297
        // i.value |= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   298
        a.value = i.value < j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   299
        a.value = i.value > j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   300
        a.value = i.value <= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   301
        a.value = i.value >= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   302
        a.value = i.value == j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   303
        a.value = i.value != j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   304
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   305
06bc494ca11e Initial load
duke
parents:
diff changeset
   306
    static void testBoolean(T6348760<Boolean> i, T6348760<Boolean> j, T6348760<Boolean> a) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   307
        // i.value++;
06bc494ca11e Initial load
duke
parents:
diff changeset
   308
        // i.value--;
06bc494ca11e Initial load
duke
parents:
diff changeset
   309
        // ++i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   310
        // --i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   311
        // i.value = +i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   312
        // i.value = -i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   313
        // i.value = ~i.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   314
        // i.value = i.value * j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   315
        // i.value = i.value / j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   316
        // i.value = i.value % j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   317
        // i.value = i.value + j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   318
        // i.value = i.value - j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   319
        // i.value = i.value << j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   320
        // i.value = i.value >> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   321
        // i.value = i.value >>> j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   322
        i.value = i.value & j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   323
        i.value = i.value ^ j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   324
        i.value = i.value | j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   325
        // i.value *= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   326
        // i.value /= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   327
        // i.value %= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   328
        // i.value += j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   329
        // i.value -= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   330
        // i.value <<= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   331
        // i.value >>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   332
        // i.value >>>= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   333
        i.value &= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   334
        i.value ^= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   335
        i.value |= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   336
        // a.value = i.value < j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   337
        // a.value = i.value > j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   338
        // a.value = i.value <= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   339
        // a.value = i.value >= j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   340
        a.value = i.value == j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   341
        a.value = i.value != j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   342
        a.value = !j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   343
        a.value = i.value && j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   344
        a.value = i.value || j.value;
06bc494ca11e Initial load
duke
parents:
diff changeset
   345
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   346
06bc494ca11e Initial load
duke
parents:
diff changeset
   347
06bc494ca11e Initial load
duke
parents:
diff changeset
   348
    public static void main(String... args) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   349
        testByte     (new T6348760<Byte>((byte)42),
06bc494ca11e Initial load
duke
parents:
diff changeset
   350
                      new T6348760<Byte>((byte)42),
06bc494ca11e Initial load
duke
parents:
diff changeset
   351
                      new T6348760<Boolean>(true));
06bc494ca11e Initial load
duke
parents:
diff changeset
   352
        testShort    (new T6348760<Short>((short)42),
06bc494ca11e Initial load
duke
parents:
diff changeset
   353
                      new T6348760<Short>((short)42),
06bc494ca11e Initial load
duke
parents:
diff changeset
   354
                      new T6348760<Boolean>(true));
06bc494ca11e Initial load
duke
parents:
diff changeset
   355
        testInteger  (new T6348760<Integer>(42),
06bc494ca11e Initial load
duke
parents:
diff changeset
   356
                      new T6348760<Integer>(42),
06bc494ca11e Initial load
duke
parents:
diff changeset
   357
                      new T6348760<Boolean>(true));
06bc494ca11e Initial load
duke
parents:
diff changeset
   358
        testLong     (new T6348760<Long>(42L),
06bc494ca11e Initial load
duke
parents:
diff changeset
   359
                      new T6348760<Long>(42L),
06bc494ca11e Initial load
duke
parents:
diff changeset
   360
                      new T6348760<Boolean>(true));
06bc494ca11e Initial load
duke
parents:
diff changeset
   361
        testCharacter(new T6348760<Character>('*'),
06bc494ca11e Initial load
duke
parents:
diff changeset
   362
                      new T6348760<Character>('*'),
06bc494ca11e Initial load
duke
parents:
diff changeset
   363
                      new T6348760<Boolean>(true));
06bc494ca11e Initial load
duke
parents:
diff changeset
   364
        testFloat    (new T6348760<Float>(42.0F),
06bc494ca11e Initial load
duke
parents:
diff changeset
   365
                      new T6348760<Float>(42.0F),
06bc494ca11e Initial load
duke
parents:
diff changeset
   366
                      new T6348760<Boolean>(true));
06bc494ca11e Initial load
duke
parents:
diff changeset
   367
        testDouble   (new T6348760<Double>(42.0D),
06bc494ca11e Initial load
duke
parents:
diff changeset
   368
                      new T6348760<Double>(42.0D),
06bc494ca11e Initial load
duke
parents:
diff changeset
   369
                      new T6348760<Boolean>(true));
06bc494ca11e Initial load
duke
parents:
diff changeset
   370
        testBoolean  (new T6348760<Boolean>(true),
06bc494ca11e Initial load
duke
parents:
diff changeset
   371
                      new T6348760<Boolean>(true),
06bc494ca11e Initial load
duke
parents:
diff changeset
   372
                      new T6348760<Boolean>(true));
06bc494ca11e Initial load
duke
parents:
diff changeset
   373
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   374
}