Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
3f897ba2
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看板
提交
3f897ba2
编写于
10月 24, 2013
作者:
R
rfield
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8027220: DefaultMethodsTest: Change test to match spec
Reviewed-by: ksrini
上级
e8202b8b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
14 deletion
+14
-14
test/tools/javac/lambdaShapes/org/openjdk/tests/separate/TestHarness.java
.../lambdaShapes/org/openjdk/tests/separate/TestHarness.java
+1
-1
test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java
...lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java
+13
-13
未找到文件。
test/tools/javac/lambdaShapes/org/openjdk/tests/separate/TestHarness.java
浏览文件 @
3f897ba2
...
...
@@ -300,7 +300,7 @@ public class TestHarness {
if
(
verboseLocal
.
get
()
==
Boolean
.
TRUE
)
{
System
.
out
.
println
(
e
.
getCause
());
}
assert
Equals
(
e
.
getCause
().
getClass
(),
exceptionType
);
assert
True
(
exceptionType
.
isAssignableFrom
(
e
.
getCause
().
getClass
())
);
}
compiler
.
cleanup
();
}
...
...
test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java
浏览文件 @
3f897ba2
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012,
2013,
Oracle and/or its affiliates. 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
...
...
@@ -255,7 +255,7 @@ public class DefaultMethodsTest extends TestHarness {
* interface J { default int m() { return 88; } }
* class C implements I, J {}
*
* TEST: C c = new C(); c.m() throws
AM
E
* TEST: C c = new C(); c.m() throws
ICC
E
*/
public
void
testConflict
()
{
// debugTest();
...
...
@@ -263,7 +263,7 @@ public class DefaultMethodsTest extends TestHarness {
Interface
J
=
new
Interface
(
"J"
,
DefaultMethod
.
std
(
"88"
));
Class
C
=
new
Class
(
"C"
,
I
,
J
);
assertThrows
(
AbstractMethod
Error
.
class
,
C
);
assertThrows
(
IncompatibleClassChange
Error
.
class
,
C
);
}
/**
...
...
@@ -271,14 +271,14 @@ public class DefaultMethodsTest extends TestHarness {
* interface J { default int m() { return 88; } }
* class C implements I, J {}
*
* TEST: C c = new C(); c.m()
throws AME
* TEST: C c = new C(); c.m()
== 88
*/
public
void
testAmbiguousReabstract
()
{
Interface
I
=
new
Interface
(
"I"
,
AbstractMethod
.
std
());
Interface
J
=
new
Interface
(
"J"
,
DefaultMethod
.
std
(
"88"
));
Class
C
=
new
Class
(
"C"
,
I
,
J
);
assert
Throws
(
AbstractMethodError
.
class
,
C
);
assert
InvokeVirtualEquals
(
88
,
C
);
}
/**
...
...
@@ -555,8 +555,8 @@ public class DefaultMethodsTest extends TestHarness {
* interface I extends J, K { int m() default { J.super.m(); } }
* class C implements I {}
*
* TEST: C c = new C(); c.m() throws
AM
E
* TODO: add case for K k = new C(); k.m() throws
AM
E
* TEST: C c = new C(); c.m() throws
ICC
E
* TODO: add case for K k = new C(); k.m() throws
ICC
E
*/
public
void
testSuperConflict
()
{
// debugTest();
...
...
@@ -571,7 +571,7 @@ public class DefaultMethodsTest extends TestHarness {
I
.
addCompilationDependency
(
Jstub
.
findMethod
(
stdMethodName
));
Class
C
=
new
Class
(
"C"
,
I
);
assertThrows
(
AbstractMethod
Error
.
class
,
C
);
assertThrows
(
IncompatibleClassChange
Error
.
class
,
C
);
}
/**
...
...
@@ -579,8 +579,8 @@ public class DefaultMethodsTest extends TestHarness {
* interface J extends I { default int m() { return 55; } }
* class C implements I, J { public int m() { return I.super.m(); } }
*
* TEST: C c = new C(); c.m()
throws AME
* TODO: add case for J j = new C(); j.m()
throws AME
* TEST: C c = new C(); c.m()
== 99
* TODO: add case for J j = new C(); j.m()
== ???
*/
public
void
testSuperDisqual
()
{
Interface
I
=
new
Interface
(
"I"
,
DefaultMethod
.
std
(
"99"
));
...
...
@@ -590,7 +590,7 @@ public class DefaultMethodsTest extends TestHarness {
AccessFlag
.
PUBLIC
));
C
.
addCompilationDependency
(
I
.
findMethod
(
stdMethodName
));
assert
Throws
(
AbstractMethodError
.
class
,
C
);
assert
InvokeVirtualEquals
(
99
,
C
);
}
/**
...
...
@@ -646,7 +646,7 @@ public class DefaultMethodsTest extends TestHarness {
* public int m(String s) { return I.super.m(s); }
* }
*
* TEST: C c = new C(); c.m("string")
throws AME
* TEST: C c = new C(); c.m("string")
== 44
*/
public
void
testSuperGenericDisqual
()
{
MethodParameter
t
=
new
MethodParameter
(
"T"
,
"t"
);
...
...
@@ -661,7 +661,7 @@ public class DefaultMethodsTest extends TestHarness {
"return I.super.m(s);"
,
AccessFlag
.
PUBLIC
,
s
));
C
.
addCompilationDependency
(
I
.
findMethod
(
stdMethodName
));
assert
Throws
(
AbstractMethodError
.
class
,
C
,
assert
InvokeVirtualEquals
(
44
,
C
,
new
ConcreteMethod
(
"int"
,
stdMethodName
,
"return -1;"
,
AccessFlag
.
PUBLIC
,
s
),
"-1"
,
"\"string\""
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录