Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
6e6cf373
D
dragonwell8_langtools
项目概览
openanolis
/
dragonwell8_langtools
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_langtools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6e6cf373
编写于
7月 10, 2008
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6724327: eliminate use of shell tests for simple golden file tests
Reviewed-by: darcy
上级
a55a07ed
变更
45
隐藏空白更改
内联
并排
Showing
45 changed file
with
133 addition
and
1614 deletion
+133
-1614
test/tools/javac/CyclicInheritance.java
test/tools/javac/CyclicInheritance.java
+1
-1
test/tools/javac/CyclicInheritance.out
test/tools/javac/CyclicInheritance.out
+8
-24
test/tools/javac/CyclicInheritance.sh
test/tools/javac/CyclicInheritance.sh
+0
-86
test/tools/javac/ExtendsAccess/ExtendsAccess.java
test/tools/javac/ExtendsAccess/ExtendsAccess.java
+1
-1
test/tools/javac/ExtendsAccess/ExtendsAccess.out
test/tools/javac/ExtendsAccess/ExtendsAccess.out
+46
-150
test/tools/javac/ExtendsAccess/ExtendsAccess.sh
test/tools/javac/ExtendsAccess/ExtendsAccess.sh
+0
-83
test/tools/javac/FloatingPointChanges/BadConstructorModifiers.java
...s/javac/FloatingPointChanges/BadConstructorModifiers.java
+1
-1
test/tools/javac/FloatingPointChanges/BadConstructorModifiers.out
...ls/javac/FloatingPointChanges/BadConstructorModifiers.out
+1
-3
test/tools/javac/FloatingPointChanges/BadConstructorModifiers.sh
...ols/javac/FloatingPointChanges/BadConstructorModifiers.sh
+0
-82
test/tools/javac/InnerNamedConstant_2.java
test/tools/javac/InnerNamedConstant_2.java
+1
-1
test/tools/javac/InnerNamedConstant_2.out
test/tools/javac/InnerNamedConstant_2.out
+4
-12
test/tools/javac/InnerNamedConstant_2.sh
test/tools/javac/InnerNamedConstant_2.sh
+0
-82
test/tools/javac/LocalClasses_2.java
test/tools/javac/LocalClasses_2.java
+1
-1
test/tools/javac/LocalClasses_2.out
test/tools/javac/LocalClasses_2.out
+1
-3
test/tools/javac/LocalClasses_2.sh
test/tools/javac/LocalClasses_2.sh
+0
-82
test/tools/javac/NameCollision.java
test/tools/javac/NameCollision.java
+1
-1
test/tools/javac/NameCollision.out
test/tools/javac/NameCollision.out
+1
-3
test/tools/javac/NameCollision.sh
test/tools/javac/NameCollision.sh
+0
-83
test/tools/javac/NestedInnerClassNames.java
test/tools/javac/NestedInnerClassNames.java
+1
-1
test/tools/javac/NestedInnerClassNames.out
test/tools/javac/NestedInnerClassNames.out
+17
-51
test/tools/javac/NestedInnerClassNames.sh
test/tools/javac/NestedInnerClassNames.sh
+0
-82
test/tools/javac/NonStaticFieldExpr1.java
test/tools/javac/NonStaticFieldExpr1.java
+1
-1
test/tools/javac/NonStaticFieldExpr1.out
test/tools/javac/NonStaticFieldExpr1.out
+1
-3
test/tools/javac/NonStaticFieldExpr1.sh
test/tools/javac/NonStaticFieldExpr1.sh
+0
-85
test/tools/javac/NonStaticFieldExpr2.java
test/tools/javac/NonStaticFieldExpr2.java
+1
-1
test/tools/javac/NonStaticFieldExpr2.out
test/tools/javac/NonStaticFieldExpr2.out
+1
-3
test/tools/javac/NonStaticFieldExpr2.sh
test/tools/javac/NonStaticFieldExpr2.sh
+0
-82
test/tools/javac/NonStaticFieldExpr3.java
test/tools/javac/NonStaticFieldExpr3.java
+1
-1
test/tools/javac/NonStaticFieldExpr3.out
test/tools/javac/NonStaticFieldExpr3.out
+1
-3
test/tools/javac/NonStaticFieldExpr3.sh
test/tools/javac/NonStaticFieldExpr3.sh
+0
-82
test/tools/javac/QualifiedAccess/QualifiedAccess_1.java
test/tools/javac/QualifiedAccess/QualifiedAccess_1.java
+3
-1
test/tools/javac/QualifiedAccess/QualifiedAccess_1.out
test/tools/javac/QualifiedAccess/QualifiedAccess_1.out
+18
-54
test/tools/javac/QualifiedAccess/QualifiedAccess_1.sh
test/tools/javac/QualifiedAccess/QualifiedAccess_1.sh
+0
-85
test/tools/javac/QualifiedAccess/QualifiedAccess_2.java
test/tools/javac/QualifiedAccess/QualifiedAccess_2.java
+3
-1
test/tools/javac/QualifiedAccess/QualifiedAccess_2.out
test/tools/javac/QualifiedAccess/QualifiedAccess_2.out
+6
-18
test/tools/javac/QualifiedAccess/QualifiedAccess_2.sh
test/tools/javac/QualifiedAccess/QualifiedAccess_2.sh
+0
-85
test/tools/javac/QualifiedAccess/QualifiedAccess_3.java
test/tools/javac/QualifiedAccess/QualifiedAccess_3.java
+1
-1
test/tools/javac/QualifiedAccess/QualifiedAccess_3.out
test/tools/javac/QualifiedAccess/QualifiedAccess_3.out
+4
-12
test/tools/javac/QualifiedAccess/QualifiedAccess_3.sh
test/tools/javac/QualifiedAccess/QualifiedAccess_3.sh
+0
-83
test/tools/javac/SynchronizedClass.java
test/tools/javac/SynchronizedClass.java
+1
-1
test/tools/javac/SynchronizedClass.out
test/tools/javac/SynchronizedClass.out
+1
-3
test/tools/javac/SynchronizedClass.sh
test/tools/javac/SynchronizedClass.sh
+0
-82
test/tools/javac/depDocComment/DeprecatedDocComment.java
test/tools/javac/depDocComment/DeprecatedDocComment.java
+2
-1
test/tools/javac/depDocComment/DeprecatedDocComment.out
test/tools/javac/depDocComment/DeprecatedDocComment.out
+3
-9
test/tools/javac/depDocComment/DeprecatedDocComment.sh
test/tools/javac/depDocComment/DeprecatedDocComment.sh
+0
-84
未找到文件。
test/tools/javac/CyclicInheritance.java
浏览文件 @
6e6cf373
...
...
@@ -4,7 +4,7 @@
* @summary Test that recursive 'extends' and 'implements' clauses are detected
* and disallowed.
*
* @
run shell CyclicInheritance.sh
* @
compile/fail/ref=CyclicInheritance.out -XDrawDiagnostics -XDstdout CyclicInheritance.java
*/
...
...
test/tools/javac/CyclicInheritance.out
浏览文件 @
6e6cf373
CyclicInheritance.java:15: cyclic inheritance involving C1
class C1 extends C1 {} // ERROR - Cyclic inheritance
^
CyclicInheritance.java:17: cyclic inheritance involving C11
class C11 extends C12 {} // ERROR - Cyclic inheritance
^
CyclicInheritance.java:20: cyclic inheritance involving I1
interface I1 extends I1 {} // ERROR - Cyclic inheritance
^
CyclicInheritance.java:22: cyclic inheritance involving I11
interface I11 extends I12 {} // ERROR - Cyclic inheritance
^
CyclicInheritance.java:27: cyclic inheritance involving C211
class C211 implements C211.I { // ERROR - may change pending resoluation of 4087020
^
CyclicInheritance.java:31: cyclic inheritance involving C212
class C212 extends C212.C { // ERROR - Cyclic inheritance, subclass cannot enclose superclass
^
CyclicInheritance.java:36: C221.I has private access in C221
class C221 implements C221.I { // ERROR - Cannot access C21 (private)
^
CyclicInheritance.java:40: C222.C has private access in C222
class C222 extends C222.C { // ERROR - Cannot access C22 (private)
^
CyclicInheritance.java:15:1: compiler.err.cyclic.inheritance: C1
CyclicInheritance.java:17:1: compiler.err.cyclic.inheritance: C11
CyclicInheritance.java:20:1: compiler.err.cyclic.inheritance: I1
CyclicInheritance.java:22:1: compiler.err.cyclic.inheritance: I11
CyclicInheritance.java:27:1: compiler.err.cyclic.inheritance: C211
CyclicInheritance.java:31:1: compiler.err.cyclic.inheritance: C212
CyclicInheritance.java:36:27: compiler.err.report.access: C221.I, private, C221
CyclicInheritance.java:40:24: compiler.err.report.access: C222.C, private, C222
8 errors
test/tools/javac/CyclicInheritance.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
rm
-rf
C1.class C11.class C12.class
rm
-rf
I1.class I11.class I12.class
rm
-rf
C211.class C2.class
cp
"
${
TESTSRC
}${
FS
}
CyclicInheritance.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
CyclicInheritance.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
CyclicInheritance.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/ExtendsAccess/ExtendsAccess.java
浏览文件 @
6e6cf373
...
...
@@ -3,7 +3,7 @@
* @bug 4087314 4087314 4785453
* @summary Test access checking within 'extends' and 'implements' clause.
* @author William Maddox (maddox)
* @
run shell ExtendsAccess.sh
* @
compile/fail/ref=ExtendsAccess.out -XDrawDiagnostics -XDstdout ExtendsAccess.java
*/
/*
...
...
test/tools/javac/ExtendsAccess/ExtendsAccess.out
浏览文件 @
6e6cf373
ExtendsAccess.java:31: cannot find symbol
symbol: class publicClass
class ExtendsAccess111 extends publicClass { } // ERROR - 'publicClass' not in scope
^
ExtendsAccess.java:32: cannot find symbol
symbol: class defaultClass
class ExtendsAccess112 extends defaultClass { } // ERROR - 'defaultClass' not in scope
^
ExtendsAccess.java:33: cannot find symbol
symbol: class protectedClass
class ExtendsAccess113 extends protectedClass { } // ERROR - 'protectedClass' not in scope
^
ExtendsAccess.java:34: cannot find symbol
symbol: class privateClass
class ExtendsAccess114 extends privateClass { } // ERROR - 'privateClass' not in scope
^
ExtendsAccess.java:39: ExtendsAccess.privateClass has private access in ExtendsAccess
class ExtendsAccess1241 extends ExtendsAccess.privateClass { } // ERROR - cannot access 'privateClass'
^
ExtendsAccess.java:42: p.ExtendsAccess.defaultClass is not public in p.ExtendsAccess; cannot be accessed from outside package
class ExtendsAccess1222 extends p.ExtendsAccess.defaultClass { } // ERROR - cannot access 'defaultClass'
^
ExtendsAccess.java:43: p.ExtendsAccess.protectedClass has protected access in p.ExtendsAccess
class ExtendsAccess1232 extends p.ExtendsAccess.protectedClass { } // ERROR - cannot access 'protectedClass'
^
ExtendsAccess.java:44: p.ExtendsAccess.privateClass has private access in p.ExtendsAccess
class ExtendsAccess1242 extends p.ExtendsAccess.privateClass { } // ERROR - cannot access 'privateClass'
^
ExtendsAccess.java:56: ExtendsAccess.privateClass has private access in ExtendsAccess
class N extends privateClass { } // ERROR - cannot access 'privateClass'
^
ExtendsAccess.java:63: p.ExtendsAccess.defaultClass is not public in p.ExtendsAccess; cannot be accessed from outside package
class N extends defaultClass { } // ERROR - cannot access 'defaultClass'
^
ExtendsAccess.java:69: p.ExtendsAccess.privateClass has private access in p.ExtendsAccess
class N extends privateClass { } // ERROR - cannot access 'privateClass'
^
ExtendsAccess.java:85: ExtendsAccess.privateClass has private access in ExtendsAccess
class N extends ExtendsAccess.privateClass { } // ERROR - cannot access 'privateClass'
^
ExtendsAccess.java:92: p.ExtendsAccess.defaultClass is not public in p.ExtendsAccess; cannot be accessed from outside package
class N extends p.ExtendsAccess.defaultClass { } // ERROR - cannot access 'defaultClass'
^
ExtendsAccess.java:101: p.ExtendsAccess.privateClass has private access in p.ExtendsAccess
class N extends p.ExtendsAccess.privateClass { } // ERROR - cannot access 'privateClass'
^
ExtendsAccess.java:104: cannot find symbol
symbol: class publicStaticClass
class ExtendsAccess211 extends publicStaticClass { } // ERROR - 'publicStaticClass' not in scope
^
ExtendsAccess.java:105: cannot find symbol
symbol: class defaultStaticClass
class ExtendsAccess212 extends defaultStaticClass { } // ERROR - 'defaultStaticClass' not in scope
^
ExtendsAccess.java:106: cannot find symbol
symbol: class protectedStaticClass
class ExtendsAccess213 extends protectedStaticClass { } // ERROR - 'protectedStaticClass' not in scope
^
ExtendsAccess.java:107: cannot find symbol
symbol: class privateStaticClass
class ExtendsAccess214 extends privateStaticClass { } // ERROR - 'privateStaticClass' not in scope
^
ExtendsAccess.java:112: ExtendsAccess.privateStaticClass has private access in ExtendsAccess
class ExtendsAccess2241 extends ExtendsAccess.privateStaticClass { } // ERROR - cannot access 'privateStaticClass'
^
ExtendsAccess.java:115: p.ExtendsAccess.defaultStaticClass is not public in p.ExtendsAccess; cannot be accessed from outside package
class ExtendsAccess2222 extends p.ExtendsAccess.defaultStaticClass { } // ERROR - cannot access 'defaultStaticClass'
^
ExtendsAccess.java:116: p.ExtendsAccess.protectedStaticClass has protected access in p.ExtendsAccess
class ExtendsAccess2232 extends p.ExtendsAccess.protectedStaticClass { }// ERROR - cannot access 'protectedStaticClass'
^
ExtendsAccess.java:117: p.ExtendsAccess.privateStaticClass has private access in p.ExtendsAccess
class ExtendsAccess2242 extends p.ExtendsAccess.privateStaticClass { } // ERROR - cannot access 'privateStaticClass'
^
ExtendsAccess.java:129: ExtendsAccess.privateStaticClass has private access in ExtendsAccess
class N extends privateStaticClass { } // ERROR - cannot access 'privateStaticClass'
^
ExtendsAccess.java:136: p.ExtendsAccess.defaultStaticClass is not public in p.ExtendsAccess; cannot be accessed from outside package
class N extends defaultStaticClass { } // ERROR - cannot access 'defaultStaticClass'
^
ExtendsAccess.java:142: p.ExtendsAccess.privateStaticClass has private access in p.ExtendsAccess
class N extends privateStaticClass { } // ERROR - cannot access 'privateStaticClass'
^
ExtendsAccess.java:158: ExtendsAccess.privateStaticClass has private access in ExtendsAccess
class N extends ExtendsAccess.privateStaticClass { } // ERROR - cannot access 'privateStaticClass'
^
ExtendsAccess.java:165: p.ExtendsAccess.defaultStaticClass is not public in p.ExtendsAccess; cannot be accessed from outside package
class N extends p.ExtendsAccess.defaultStaticClass { } // ERROR - cannot access 'defaultStaticClass'
^
ExtendsAccess.java:174: p.ExtendsAccess.privateStaticClass has private access in p.ExtendsAccess
class N extends p.ExtendsAccess.privateStaticClass { } // ERROR - cannot access 'privateStaticClass'
^
ExtendsAccess.java:177: cannot find symbol
symbol: class publicInterface
class ExtendsAccess311 extends ExtendsAccess implements publicInterface { } // ERROR - 'publicInterface' not in scope
^
ExtendsAccess.java:178: cannot find symbol
symbol: class defaultInterface
class ExtendsAccess312 extends ExtendsAccess implements defaultInterface { } // ERROR - 'defaultInterface' not in scope
^
ExtendsAccess.java:179: cannot find symbol
symbol: class protectedInterface
class ExtendsAccess313 extends ExtendsAccess implements protectedInterface { } // ERROR - 'protectedInterface' not in scope
^
ExtendsAccess.java:180: cannot find symbol
symbol: class privateInterface
class ExtendsAccess314 extends ExtendsAccess implements privateInterface { } // ERROR - 'privateInterface' not in scope
^
ExtendsAccess.java:186: ExtendsAccess.privateInterface has private access in ExtendsAccess
implements ExtendsAccess.privateInterface { } // ERROR - cannot access 'privateInterface'
^
ExtendsAccess.java:191: p.ExtendsAccess.defaultInterface is not public in p.ExtendsAccess; cannot be accessed from outside package
implements p.ExtendsAccess.defaultInterface { } // ERROR - cannot access 'defaultStaticClass'
^
ExtendsAccess.java:193: p.ExtendsAccess.protectedInterface has protected access in p.ExtendsAccess
implements p.ExtendsAccess.protectedInterface { } // ERROR - cannot access 'protectedStaticClass'
^
ExtendsAccess.java:195: p.ExtendsAccess.privateInterface has private access in p.ExtendsAccess
implements p.ExtendsAccess.privateInterface { } // ERROR - cannot access 'privateInterface'
^
ExtendsAccess.java:207: ExtendsAccess.privateInterface has private access in ExtendsAccess
class N implements privateInterface { } // ERROR - cannot access 'privateInterface'
^
ExtendsAccess.java:214: p.ExtendsAccess.defaultInterface is not public in p.ExtendsAccess; cannot be accessed from outside package
class N implements defaultInterface { } // ERROR - cannot access 'defaultStaticClass'
^
ExtendsAccess.java:220: p.ExtendsAccess.privateInterface has private access in p.ExtendsAccess
class N implements privateInterface { } // ERROR - cannot access 'privateInterface'
^
ExtendsAccess.java:236: ExtendsAccess.privateInterface has private access in ExtendsAccess
class N implements ExtendsAccess.privateInterface { } // ERROR - cannot access 'privateInterface'
^
ExtendsAccess.java:243: p.ExtendsAccess.defaultInterface is not public in p.ExtendsAccess; cannot be accessed from outside package
class N implements p.ExtendsAccess.defaultInterface { } // ERROR - cannot access 'defaultClass'
^
ExtendsAccess.java:252: p.ExtendsAccess.privateInterface has private access in p.ExtendsAccess
class N implements p.ExtendsAccess.privateInterface { } // ERROR - cannot access 'privateInterface'
^
ExtendsAccess.java:36: an enclosing instance that contains ExtendsAccess.publicClass is required
class ExtendsAccess1211 extends ExtendsAccess.publicClass { } // OK - can extend inner classes (was ERROR - no enclosing instance)
^
ExtendsAccess.java:37: an enclosing instance that contains ExtendsAccess.defaultClass is required
class ExtendsAccess1221 extends ExtendsAccess.defaultClass { } // OK - can extend inner classes (was ERROR - no enclosing instance)
^
ExtendsAccess.java:38: an enclosing instance that contains ExtendsAccess.protectedClass is required
class ExtendsAccess1231 extends ExtendsAccess.protectedClass { } // OK - can extend inner classes (was ERROR - no enclosing instance)
^
ExtendsAccess.java:41: an enclosing instance that contains p.ExtendsAccess.publicClass is required
class ExtendsAccess1212 extends p.ExtendsAccess.publicClass { } // OK - can extend inner classes (was ERROR - no enclosing instance)
^
ExtendsAccess.java:31:32: compiler.err.cant.resolve: (- compiler.misc.kindname.class), publicClass, ,
ExtendsAccess.java:32:32: compiler.err.cant.resolve: (- compiler.misc.kindname.class), defaultClass, ,
ExtendsAccess.java:33:32: compiler.err.cant.resolve: (- compiler.misc.kindname.class), protectedClass, ,
ExtendsAccess.java:34:32: compiler.err.cant.resolve: (- compiler.misc.kindname.class), privateClass, ,
ExtendsAccess.java:39:46: compiler.err.report.access: ExtendsAccess.privateClass, private, ExtendsAccess
ExtendsAccess.java:42:48: compiler.err.not.def.public.cant.access: p.ExtendsAccess.defaultClass, p.ExtendsAccess
ExtendsAccess.java:43:48: compiler.err.report.access: p.ExtendsAccess.protectedClass, protected, p.ExtendsAccess
ExtendsAccess.java:44:48: compiler.err.report.access: p.ExtendsAccess.privateClass, private, p.ExtendsAccess
ExtendsAccess.java:56:21: compiler.err.report.access: ExtendsAccess.privateClass, private, ExtendsAccess
ExtendsAccess.java:63:21: compiler.err.not.def.public.cant.access: p.ExtendsAccess.defaultClass, p.ExtendsAccess
ExtendsAccess.java:69:21: compiler.err.report.access: p.ExtendsAccess.privateClass, private, p.ExtendsAccess
ExtendsAccess.java:85:34: compiler.err.report.access: ExtendsAccess.privateClass, private, ExtendsAccess
ExtendsAccess.java:92:36: compiler.err.not.def.public.cant.access: p.ExtendsAccess.defaultClass, p.ExtendsAccess
ExtendsAccess.java:101:36: compiler.err.report.access: p.ExtendsAccess.privateClass, private, p.ExtendsAccess
ExtendsAccess.java:104:32: compiler.err.cant.resolve: (- compiler.misc.kindname.class), publicStaticClass, ,
ExtendsAccess.java:105:32: compiler.err.cant.resolve: (- compiler.misc.kindname.class), defaultStaticClass, ,
ExtendsAccess.java:106:32: compiler.err.cant.resolve: (- compiler.misc.kindname.class), protectedStaticClass, ,
ExtendsAccess.java:107:32: compiler.err.cant.resolve: (- compiler.misc.kindname.class), privateStaticClass, ,
ExtendsAccess.java:112:46: compiler.err.report.access: ExtendsAccess.privateStaticClass, private, ExtendsAccess
ExtendsAccess.java:115:48: compiler.err.not.def.public.cant.access: p.ExtendsAccess.defaultStaticClass, p.ExtendsAccess
ExtendsAccess.java:116:48: compiler.err.report.access: p.ExtendsAccess.protectedStaticClass, protected, p.ExtendsAccess
ExtendsAccess.java:117:48: compiler.err.report.access: p.ExtendsAccess.privateStaticClass, private, p.ExtendsAccess
ExtendsAccess.java:129:21: compiler.err.report.access: ExtendsAccess.privateStaticClass, private, ExtendsAccess
ExtendsAccess.java:136:21: compiler.err.not.def.public.cant.access: p.ExtendsAccess.defaultStaticClass, p.ExtendsAccess
ExtendsAccess.java:142:21: compiler.err.report.access: p.ExtendsAccess.privateStaticClass, private, p.ExtendsAccess
ExtendsAccess.java:158:34: compiler.err.report.access: ExtendsAccess.privateStaticClass, private, ExtendsAccess
ExtendsAccess.java:165:36: compiler.err.not.def.public.cant.access: p.ExtendsAccess.defaultStaticClass, p.ExtendsAccess
ExtendsAccess.java:174:36: compiler.err.report.access: p.ExtendsAccess.privateStaticClass, private, p.ExtendsAccess
ExtendsAccess.java:177:57: compiler.err.cant.resolve: (- compiler.misc.kindname.class), publicInterface, ,
ExtendsAccess.java:178:57: compiler.err.cant.resolve: (- compiler.misc.kindname.class), defaultInterface, ,
ExtendsAccess.java:179:57: compiler.err.cant.resolve: (- compiler.misc.kindname.class), protectedInterface, ,
ExtendsAccess.java:180:57: compiler.err.cant.resolve: (- compiler.misc.kindname.class), privateInterface, ,
ExtendsAccess.java:186:33: compiler.err.report.access: ExtendsAccess.privateInterface, private, ExtendsAccess
ExtendsAccess.java:191:35: compiler.err.not.def.public.cant.access: p.ExtendsAccess.defaultInterface, p.ExtendsAccess
ExtendsAccess.java:193:35: compiler.err.report.access: p.ExtendsAccess.protectedInterface, protected, p.ExtendsAccess
ExtendsAccess.java:195:35: compiler.err.report.access: p.ExtendsAccess.privateInterface, private, p.ExtendsAccess
ExtendsAccess.java:207:24: compiler.err.report.access: ExtendsAccess.privateInterface, private, ExtendsAccess
ExtendsAccess.java:214:24: compiler.err.not.def.public.cant.access: p.ExtendsAccess.defaultInterface, p.ExtendsAccess
ExtendsAccess.java:220:24: compiler.err.report.access: p.ExtendsAccess.privateInterface, private, p.ExtendsAccess
ExtendsAccess.java:236:37: compiler.err.report.access: ExtendsAccess.privateInterface, private, ExtendsAccess
ExtendsAccess.java:243:39: compiler.err.not.def.public.cant.access: p.ExtendsAccess.defaultInterface, p.ExtendsAccess
ExtendsAccess.java:252:39: compiler.err.report.access: p.ExtendsAccess.privateInterface, private, p.ExtendsAccess
ExtendsAccess.java:36:1: compiler.err.encl.class.required: ExtendsAccess.publicClass
ExtendsAccess.java:37:1: compiler.err.encl.class.required: ExtendsAccess.defaultClass
ExtendsAccess.java:38:1: compiler.err.encl.class.required: ExtendsAccess.protectedClass
ExtendsAccess.java:41:1: compiler.err.encl.class.required: p.ExtendsAccess.publicClass
46 errors
test/tools/javac/ExtendsAccess/ExtendsAccess.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
ExtendsAccess.java"
.
cp
-r
"
${
TESTSRC
}${
FS
}
p"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
ExtendsAccess.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
ExtendsAccess.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/FloatingPointChanges/BadConstructorModifiers.java
浏览文件 @
6e6cf373
...
...
@@ -4,7 +4,7 @@
* @summary strictfp may not be used with constructors
* @author David Stoutamire (dps)
*
* @
run shell BadConstructorModifiers.sh
* @
compile/fail/ref=BadConstructorModifiers.out -XDrawDiagnostics -XDstdout BadConstructorModifiers.java
*/
public
class
BadConstructorModifiers
{
...
...
test/tools/javac/FloatingPointChanges/BadConstructorModifiers.out
浏览文件 @
6e6cf373
BadConstructorModifiers.java:12: modifier strictfp not allowed here
strictfp BadConstructorModifiers (double abra) { }
^
BadConstructorModifiers.java:12:14: compiler.err.mod.not.allowed.here: strictfp
1 error
test/tools/javac/FloatingPointChanges/BadConstructorModifiers.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
BadConstructorModifiers.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
BadConstructorModifiers.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
BadConstructorModifiers.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/InnerNamedConstant_2.java
浏览文件 @
6e6cf373
...
...
@@ -4,7 +4,7 @@
* @summary Verify rejection of illegal static variables in inner classes.
* @author William Maddox (maddox)
*
* @
run shell InnerNamedConstant_2.sh
* @
compile/fail/ref=InnerNamedConstant_2.out -XDrawDiagnostics -XDstdout InnerNamedConstant_2.java
*/
public
class
InnerNamedConstant_2
{
...
...
test/tools/javac/InnerNamedConstant_2.out
浏览文件 @
6e6cf373
InnerNamedConstant_2.java:22: inner classes cannot have static declarations
static int x = 1; // ERROR - static not final
^
InnerNamedConstant_2.java:23: inner classes cannot have static declarations
static final String z; // ERROR - static blank final
^
InnerNamedConstant_2.java:25: cannot assign a value to final variable z
z = "foobar"; // Error may be reported here. See 4278961.
^
InnerNamedConstant_2.java:34: inner classes cannot have static declarations
static final int y = Inner1.x * 5; // ERROR - initializer not constant
^
InnerNamedConstant_2.java:22:20: compiler.err.icls.cant.have.static.decl
InnerNamedConstant_2.java:23:29: compiler.err.icls.cant.have.static.decl
InnerNamedConstant_2.java:25:13: compiler.err.cant.assign.val.to.final.var: z
InnerNamedConstant_2.java:34:26: compiler.err.icls.cant.have.static.decl
4 errors
test/tools/javac/InnerNamedConstant_2.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
InnerNamedConstant_2.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
InnerNamedConstant_2.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
InnerNamedConstant_2.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/LocalClasses_2.java
浏览文件 @
6e6cf373
...
...
@@ -4,7 +4,7 @@
* @summary Verify that a local class cannot be redefined within its scope.
* @author William Maddox (maddox)
*
* @
run shell LocalClasses_2.sh
* @
compile/fail/ref=LocalClasses_2.out -XDrawDiagnostics -XDstdout LocalClasses_2.java
*/
class
LocalClasses_2
{
...
...
test/tools/javac/LocalClasses_2.out
浏览文件 @
6e6cf373
LocalClasses_2.java:15: Local is already defined in foo()
class Local { } // ERROR
^
LocalClasses_2.java:15:13: compiler.err.already.defined: Local, foo()
1 error
test/tools/javac/LocalClasses_2.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
LocalClasses_2.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
LocalClasses_2.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
LocalClasses_2.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/NameCollision.java
浏览文件 @
6e6cf373
...
...
@@ -4,7 +4,7 @@
* @summary Interface names for classes in the same scope should not
* cause the compiler to crash.
*
* @
run shell NameCollision.sh
* @
compile/fail/ref=NameCollision.out -XDrawDiagnostics -XDstdout NameCollision.java
*/
// The test fails if the compiler crashes.
...
...
test/tools/javac/NameCollision.out
浏览文件 @
6e6cf373
NameCollision.java:13: interface expected here
class Runnable implements Runnable { } // ERROR
^
NameCollision.java:13:31: compiler.err.intf.expected.here
1 error
test/tools/javac/NameCollision.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
NameCollision.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
NameCollision.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
NameCollision.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/NestedInnerClassNames.java
浏览文件 @
6e6cf373
...
...
@@ -4,7 +4,7 @@
* @summary Verify that an inner class cannot have the same simple name as an enclosing one.
* @author William Maddox (maddox)
*
* @
run shell NestedInnerClassNames.sh
* @
compile/fail/ref=NestedInnerClassNames.out -XDrawDiagnostics -XDstdout NestedInnerClassNames.java
*/
/*
...
...
test/tools/javac/NestedInnerClassNames.out
浏览文件 @
6e6cf373
NestedInnerClassNames.java:16: NestedInnerClassNames is already defined in unnamed package
class NestedInnerClassNames {} // ERROR
^
NestedInnerClassNames.java:23: NestedInnerClassNames.foo is already defined in NestedInnerClassNames
class foo { } // ERROR
^
NestedInnerClassNames.java:34: NestedInnerClassNames is already defined in unnamed package
class NestedInnerClassNames {} // ERROR
^
NestedInnerClassNames.java:45: NestedInnerClassNames.baz is already defined in NestedInnerClassNames
class baz { // ERROR
^
NestedInnerClassNames.java:46: NestedInnerClassNames.baz.baz is already defined in NestedInnerClassNames.baz
class baz { } // ERROR
^
NestedInnerClassNames.java:59: NestedInnerClassNames.foo$bar is already defined in NestedInnerClassNames
class foo$bar { // ERROR
^
NestedInnerClassNames.java:76: NestedInnerClassNames.$bar is already defined in NestedInnerClassNames
class $bar { } // ERROR
^
NestedInnerClassNames.java:90: NestedInnerClassNames.bar$bar.bar is already defined in NestedInnerClassNames.bar$bar
class bar{ } // ERROR
^
NestedInnerClassNames.java:109: duplicate class: NestedInnerClassNames.foo.foo
class foo$foo { } // ERROR
^
NestedInnerClassNames.java:19: NestedInnerClassNames is already defined in unnamed package
class NestedInnerClassNames {} // ERROR
^
NestedInnerClassNames.java:28: foo is already defined in m2()
class foo { } // ERROR
^
NestedInnerClassNames.java:40: NestedInnerClassNames is already defined in unnamed package
class NestedInnerClassNames {} // ERROR
^
NestedInnerClassNames.java:52: baz is already defined in m4()
class baz { // ERROR
^
NestedInnerClassNames.java:53: baz.baz is already defined in baz
class baz { } // ERROR
^
NestedInnerClassNames.java:67: foo$bar is already defined in m5()
class foo$bar { // ERROR
^
NestedInnerClassNames.java:83: $bar is already defined in m6()
class $bar { } // ERROR
^
NestedInnerClassNames.java:97: bar$bar.bar is already defined in bar$bar
class bar{ } // ERROR
^
NestedInnerClassNames.java:16:5: compiler.err.already.defined: NestedInnerClassNames, unnamed package
NestedInnerClassNames.java:23:9: compiler.err.already.defined: NestedInnerClassNames.foo, NestedInnerClassNames
NestedInnerClassNames.java:34:9: compiler.err.already.defined: NestedInnerClassNames, unnamed package
NestedInnerClassNames.java:45:9: compiler.err.already.defined: NestedInnerClassNames.baz, NestedInnerClassNames
NestedInnerClassNames.java:46:13: compiler.err.already.defined: NestedInnerClassNames.baz.baz, NestedInnerClassNames.baz
NestedInnerClassNames.java:59:9: compiler.err.already.defined: NestedInnerClassNames.foo$bar, NestedInnerClassNames
NestedInnerClassNames.java:76:13: compiler.err.already.defined: NestedInnerClassNames.$bar, NestedInnerClassNames
NestedInnerClassNames.java:90:13: compiler.err.already.defined: NestedInnerClassNames.bar$bar.bar, NestedInnerClassNames.bar$bar
NestedInnerClassNames.java:109:5: compiler.err.duplicate.class: NestedInnerClassNames.foo.foo
NestedInnerClassNames.java:19:9: compiler.err.already.defined: NestedInnerClassNames, unnamed package
NestedInnerClassNames.java:28:13: compiler.err.already.defined: foo, m2()
NestedInnerClassNames.java:40:13: compiler.err.already.defined: NestedInnerClassNames, unnamed package
NestedInnerClassNames.java:52:13: compiler.err.already.defined: baz, m4()
NestedInnerClassNames.java:53:17: compiler.err.already.defined: baz.baz, baz
NestedInnerClassNames.java:67:13: compiler.err.already.defined: foo$bar, m5()
NestedInnerClassNames.java:83:17: compiler.err.already.defined: $bar, m6()
NestedInnerClassNames.java:97:17: compiler.err.already.defined: bar$bar.bar, bar$bar
17 errors
test/tools/javac/NestedInnerClassNames.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
NestedInnerClassNames.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
NestedInnerClassNames.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
NestedInnerClassNames.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/NonStaticFieldExpr1.java
浏览文件 @
6e6cf373
...
...
@@ -3,7 +3,7 @@
@author dps
@summary field: instance access through types is not allowed
@
run shell NonStaticFieldExpr1.sh
@
compile/fail/ref=NonStaticFieldExpr1.out -XDrawDiagnostics -XDstdout NonStaticFieldExpr1.java
*/
class
NonStaticFieldExpr1
{
public
int
x
;
...
...
test/tools/javac/NonStaticFieldExpr1.out
浏览文件 @
6e6cf373
NonStaticFieldExpr1.java:10: non-static variable x cannot be referenced from a static context
int y = NonStaticFieldExpr1.x; // SHOULD BE ERROR
^
NonStaticFieldExpr1.java:10:30: compiler.err.non-static.cant.be.ref: (- compiler.misc.kindname.variable), x
1 error
test/tools/javac/NonStaticFieldExpr1.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
NonStaticFieldExpr1.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
NonStaticFieldExpr1.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
NonStaticFieldExpr1.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/NonStaticFieldExpr2.java
浏览文件 @
6e6cf373
...
...
@@ -3,7 +3,7 @@
@author dps
@summary method: instance access through types is not allowed
@
run shell NonStaticFieldExpr2.sh
@
compile/fail/ref=NonStaticFieldExpr2.out -XDrawDiagnostics -XDstdout NonStaticFieldExpr2.java
*/
class
NonStaticFieldExpr2
{
...
...
test/tools/javac/NonStaticFieldExpr2.out
浏览文件 @
6e6cf373
NonStaticFieldExpr2.java:14: non-static variable x cannot be referenced from a static context
int z = NonStaticFieldExpr2.x; // SHOULD BE ERROR
^
NonStaticFieldExpr2.java:14:33: compiler.err.non-static.cant.be.ref: (- compiler.misc.kindname.variable), x
1 error
test/tools/javac/NonStaticFieldExpr2.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
NonStaticFieldExpr2.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
NonStaticFieldExpr2.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
NonStaticFieldExpr2.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/NonStaticFieldExpr3.java
浏览文件 @
6e6cf373
...
...
@@ -3,7 +3,7 @@
@author dps
@summary class: instance access through types is not allowed
@
run shell NonStaticFieldExpr3.sh
@
compile/fail/ref=NonStaticFieldExpr3.out -XDrawDiagnostics -XDstdout NonStaticFieldExpr3.java
*/
class
NonStaticFieldExpr3
{
...
...
test/tools/javac/NonStaticFieldExpr3.out
浏览文件 @
6e6cf373
NonStaticFieldExpr3.java:14: non-static variable x cannot be referenced from a static context
int a = NonStaticFieldExpr3.x; // SHOULD BE ERROR
^
NonStaticFieldExpr3.java:14:30: compiler.err.non-static.cant.be.ref: (- compiler.misc.kindname.variable), x
1 error
test/tools/javac/NonStaticFieldExpr3.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
NonStaticFieldExpr3.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
NonStaticFieldExpr3.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
NonStaticFieldExpr3.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/QualifiedAccess/QualifiedAccess_1.java
浏览文件 @
6e6cf373
...
...
@@ -5,7 +5,9 @@
* the type to which a component member belongs be accessible in qualified
* names.
*
* @run shell QualifiedAccess_1.sh
* @compile pack1/P1.java
* @compile pack1/P2.java
* @compile/fail/ref=QualifiedAccess_1.out -XDrawDiagnostics -XDstdout QualifiedAccess_1.java
*/
import
pack1.P1
;
...
...
test/tools/javac/QualifiedAccess/QualifiedAccess_1.out
浏览文件 @
6e6cf373
QualifiedAccess_1.java:22: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
P1.P3 bar; // ERROR
^
QualifiedAccess_1.java:23: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
P1.P3.P4 baz; // ERROR
^
QualifiedAccess_1.java:24: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
P1.P3.P4.P5 quux; // ERROR
^
QualifiedAccess_1.java:27: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
P1.P3 m12() {return null;} // ERROR
^
QualifiedAccess_1.java:28: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
P1.P3.P4 m13() {return null;} // ERROR
^
QualifiedAccess_1.java:29: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
P1.P3.P4.P5 m14() {return null;} // ERROR
^
QualifiedAccess_1.java:32: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
void m22(P1.P3 x) {} // ERROR
^
QualifiedAccess_1.java:33: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
void m23(P1.P3.P4 x) {} // ERROR
^
QualifiedAccess_1.java:34: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
void m24(P1.P3.P4.P5 x) {} // ERROR
^
QualifiedAccess_1.java:44: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
P1.P3 bar = null; // ERROR
^
QualifiedAccess_1.java:45: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
P1.P3.P4 baz = null; // ERROR
^
QualifiedAccess_1.java:46: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
P1.P3.P4.P5 quux = null; // ERROR
^
QualifiedAccess_1.java:57: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
Object bar = (P1.P3)null; // ERROR
^
QualifiedAccess_1.java:58: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
Object baz = (P1.P3.P4)null; // ERROR
^
QualifiedAccess_1.java:59: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
Object quux = (P1.P3.P4.P5)null; // ERROR
^
QualifiedAccess_1.java:70: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
boolean bar = null instanceof P1.P3; // ERROR
^
QualifiedAccess_1.java:71: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
boolean baz = null instanceof P1.P3.P4; // ERROR
^
QualifiedAccess_1.java:72: pack1.P1.P3 is not public in pack1.P1; cannot be accessed from outside package
boolean quux = null instanceof P1.P3.P4.P5; // ERROR
^
QualifiedAccess_1.java:24:7: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:25:7: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:26:7: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:29:7: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:30:7: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:31:7: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:34:16: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:35:16: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:36:16: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:46:11: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:47:11: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:48:11: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:59:25: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:60:25: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:61:26: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:72:41: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:73:41: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
QualifiedAccess_1.java:74:42: compiler.err.not.def.public.cant.access: pack1.P1.P3, pack1.P1
18 errors
test/tools/javac/QualifiedAccess/QualifiedAccess_1.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
QualifiedAccess_1.java"
.
cp
-r
"
${
TESTSRC
}${
FS
}
pack1"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
pack1
${
FS
}
P1.java
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
pack1
${
FS
}
P2.java
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
QualifiedAccess_1.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
QualifiedAccess_1.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/QualifiedAccess/QualifiedAccess_2.java
浏览文件 @
6e6cf373
...
...
@@ -5,7 +5,9 @@
* the type to which a component member belongs be accessible in qualified
* names.
*
* @run shell QualifiedAccess_2.sh
* @compile pack1/P1.java
* @compile pack1/P2.java
* @compile/fail/ref=QualifiedAccess_2.out -XDrawDiagnostics -XDstdout QualifiedAccess_2.java
*/
import
pack1.P1
;
...
...
test/tools/javac/QualifiedAccess/QualifiedAccess_2.out
浏览文件 @
6e6cf373
QualifiedAccess_2.java:38: A.B has private access in A
class C extends A.B {} // ERROR - B is inaccessible
^
QualifiedAccess_2.java:39: A.B has private access in A
class D extends A.B.Inner {} // ERROR - B is inaccessible
^
QualifiedAccess_2.java:43: pack1.P1.Foo is not public in pack1.P1; cannot be accessed from outside package
P1.Foo.Bar x; // ERROR - Foo is inaccessible
^
QualifiedAccess_2.java:50: Y.Quux.Quem has private access in Y.Quux
void foo() throws Y.Quux.Quem.MyError {
^
QualifiedAccess_2.java:28: pack1.P1.R.S has private access in pack1.P1.R
Object z = new R.S.T(); // ERROR - S is inaccessible
^
QualifiedAccess_2.java:52: Y.Quux.Quem has private access in Y.Quux
throw new Y.Quux.Quem.MyError();
^
QualifiedAccess_2.java:40:22: compiler.err.report.access: A.B, private, A
QualifiedAccess_2.java:41:22: compiler.err.report.access: A.B, private, A
QualifiedAccess_2.java:45:15: compiler.err.not.def.public.cant.access: pack1.P1.Foo, pack1.P1
QualifiedAccess_2.java:52:29: compiler.err.report.access: Y.Quux.Quem, private, Y.Quux
QualifiedAccess_2.java:30:25: compiler.err.report.access: pack1.P1.R.S, private, pack1.P1.R
QualifiedAccess_2.java:54:25: compiler.err.report.access: Y.Quux.Quem, private, Y.Quux
6 errors
test/tools/javac/QualifiedAccess/QualifiedAccess_2.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
QualifiedAccess_2.java"
.
cp
-r
"
${
TESTSRC
}${
FS
}
pack1"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
pack1
${
FS
}
P1.java
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
pack1
${
FS
}
P2.java
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
QualifiedAccess_2.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
QualifiedAccess_2.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/QualifiedAccess/QualifiedAccess_3.java
浏览文件 @
6e6cf373
...
...
@@ -5,7 +5,7 @@
* the type to which a component member belongs be accessible in qualified
* names.
*
* @
run shell QualifiedAccess_3.sh
* @
compile/fail/ref=QualifiedAccess_3.out -XDrawDiagnostics -XDstdout QualifiedAccess_3.java
*/
import
pack1.P1
;
...
...
test/tools/javac/QualifiedAccess/QualifiedAccess_3.out
浏览文件 @
6e6cf373
QualifiedAccess_3.java:39: pack1.P1.Foo is not public in pack1.P1; cannot be accessed from outside package
P1.Foo.Bar x = null; // ERROR - 'P1.Foo' not accessible
^
QualifiedAccess_3.java:40: length in Array is defined in an inaccessible class or interface
int i = p1.a.length; // ERROR - Type of 'a' not accessible
^
QualifiedAccess_3.java:43: privatei in pack1.P2 is defined in an inaccessible class or interface
p1.p2.privatei = 3; // ERROR - Type of 'p1.p2' not accessible.
^
QualifiedAccess_3.java:44: privatei in pack1.P2 is defined in an inaccessible class or interface
System.out.println (p1.p2.privatei); // ERROR - Type of 'p1.p2' not accessible.
^
QualifiedAccess_3.java:39:11: compiler.err.not.def.public.cant.access: pack1.P1.Foo, pack1.P1
QualifiedAccess_3.java:40:21: compiler.err.not.def.access.class.intf.cant.access: length, Array
QualifiedAccess_3.java:43:14: compiler.err.not.def.access.class.intf.cant.access: privatei, pack1.P2
QualifiedAccess_3.java:44:34: compiler.err.not.def.access.class.intf.cant.access: privatei, pack1.P2
4 errors
test/tools/javac/QualifiedAccess/QualifiedAccess_3.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
QualifiedAccess_3.java"
.
cp
-r
"
${
TESTSRC
}${
FS
}
pack1"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
QualifiedAccess_3.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
QualifiedAccess_3.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/SynchronizedClass.java
浏览文件 @
6e6cf373
...
...
@@ -3,7 +3,7 @@
@summary Verify that ClassModifier "synchronized" is not allowed.
@author dps
@
run shell SynchronizedClass.sh
@
compile/fail/ref=SynchronizedClass.out -XDrawDiagnostics -XDstdout SynchronizedClass.java
*/
public
synchronized
class
SynchronizedClass
{
}
// ERROR
test/tools/javac/SynchronizedClass.out
浏览文件 @
6e6cf373
SynchronizedClass.java:9: modifier synchronized not allowed here
public synchronized class SynchronizedClass { } // ERROR
^
SynchronizedClass.java:9:21: compiler.err.mod.not.allowed.here: synchronized
1 error
test/tools/javac/SynchronizedClass.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
SynchronizedClass.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
SynchronizedClass.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
SynchronizedClass.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
test/tools/javac/depDocComment/DeprecatedDocComment.java
浏览文件 @
6e6cf373
...
...
@@ -5,7 +5,8 @@
* docComment only
* @author Jing Qian
*
* @run shell DeprecatedDocComment.sh
* @compile DeprecatedDocComment2.java
* @compile/fail/ref=DeprecatedDocComment.out -XDrawDiagnostics -XDstdout -Werror -deprecation DeprecatedDocComment.java
*/
// WARNING: This file needs to be compiled with the -deprecation flag on.
...
...
test/tools/javac/depDocComment/DeprecatedDocComment.out
浏览文件 @
6e6cf373
DeprecatedDocComment.java:26: warning: [deprecation] deprecatedTest1() in DeprecatedDocComment2 has been deprecated
DeprecatedDocComment2.deprecatedTest1();
^
DeprecatedDocComment.java:30: warning: [deprecation] deprecatedTest5() in DeprecatedDocComment2 has been deprecated
DeprecatedDocComment2.deprecatedTest5();
^
DeprecatedDocComment.java:31: warning: [deprecation] deprecatedTest6() in DeprecatedDocComment2 has been deprecated
DeprecatedDocComment2.deprecatedTest6();
^
DeprecatedDocComment.java:27:28: compiler.warn.has.been.deprecated: deprecatedTest1(), DeprecatedDocComment2
DeprecatedDocComment.java:31:28: compiler.warn.has.been.deprecated: deprecatedTest5(), DeprecatedDocComment2
DeprecatedDocComment.java:32:28: compiler.warn.has.been.deprecated: deprecatedTest6(), DeprecatedDocComment2
3 warnings
test/tools/javac/depDocComment/DeprecatedDocComment.sh
已删除
100644 → 0
浏览文件 @
a55a07ed
#!/bin/sh
#
# Copyright 1999-2002 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
if
[
"
${
TESTSRC
}
"
=
""
]
then
echo
"TESTSRC not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTSRC=
${
TESTSRC
}
"
if
[
"
${
TESTJAVA
}
"
=
""
]
then
echo
"TESTJAVA not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTJAVA=
${
TESTJAVA
}
"
if
[
"
${
TESTCLASSES
}
"
=
""
]
then
echo
"TESTCLASSES not set. Test cannot execute. Failed."
exit
1
fi
echo
"TESTCLASSES=
${
TESTCLASSES
}
"
echo
"CLASSPATH=
${
CLASSPATH
}
"
# set platform-dependent variables
OS
=
`
uname
-s
`
case
"
$OS
"
in
SunOS
|
Linux
)
NULL
=
/dev/null
PS
=
":"
FS
=
"/"
;;
Windows
*
)
NULL
=
NUL
PS
=
";"
FS
=
"
\\
"
;;
*
)
echo
"Unrecognized system!"
exit
1
;
;;
esac
TMP1
=
OUTPUT.txt
cp
"
${
TESTSRC
}${
FS
}
DeprecatedDocComment.java"
.
cp
"
${
TESTSRC
}${
FS
}
DeprecatedDocComment2.java"
.
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
DeprecatedDocComment2.java
"
${
TESTJAVA
}${
FS
}
bin
${
FS
}
javac"
${
TESTTOOLVMOPTS
}
-deprecation
DeprecatedDocComment.java 2>
${
TMP1
}
cat
${
TMP1
}
diff
-c
"
${
TESTSRC
}${
FS
}
DeprecatedDocComment.out"
${
TMP1
}
result
=
$?
rm
${
TMP1
}
if
[
$result
-eq
0
]
then
echo
"Passed"
else
echo
"Failed"
fi
exit
$result
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录