/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 4891872
* @summary Some tests for the generic core reflection api.
* @author Gilad Bracha
* @compile TestN1.java
*/
public class Inner1 {
}
public boolean x;
public byte b;
public short s;
public char c;
public int i;
public long l;
public float f;
public double d;
public boolean[] xa;
public byte[] ba;
public short[] sa;
public char[] ca;
public int[] ia;
public long[] la;
public float[] fa;
public double[] da;
}
{ return 3;}
boolean b;
}
}
}
public class TestN1 {
testInner1();
testInner2();
testInner3();
}
static void testTypeParameters() {
assert
"N1 should have two type parameters";
}
static void testInner1() {
assert
"N1.Inner2 should have no type parameters";
}
assert
"N1.Inner2 should have one type parameter";
assert
"Type of Inner2.x should be boolean";
assert
"Type of Inner2.b should be byte";
assert
"Type of Inner2.s should be short";
assert
"Type of Inner2.x should be char";
assert
"Type of Inner2.i should be int";
assert
"Type of Inner2.l should be long";
assert
"Type of Inner2.f should be float";
assert
"Type of Inner2.d should be double";
assert
"Type of Inner2.xa should be boolean[]";
assert
"Type of Inner2.ba should be byte[]";
assert
"Type of Inner2.sa should be short[]";
assert
"Type of Inner2.xa should be char[]";
assert
"Type of Inner2.ia should be int[]";
assert
"Type of Inner2.la should be long[]";
assert
"Type of Inner2.fa should be float[]";
assert
"Type of Inner2.da should be double[]";
}
static void testInner3() {
assert
"N1.Inner2 should have three type parameters";
}
}