added new test case constructor declaring checked exceptions

This commit is contained in:
Bhanu
2019-03-03 10:05:42 -06:00
parent e8a328e733
commit fac3c6b0a4

View File

@ -42,7 +42,7 @@ public class Foo {
</test-code>
<test-code>
<description><![CDATA[
declaring checked exceptions like IOException is fine
method declaring checked exceptions like IOException is fine
]]></description>
<expected-problems>0</expected-problems>
<code><![CDATA[
@ -55,6 +55,19 @@ public class Foo {
</test-code>
<test-code>
<description><![CDATA[
constructor declaring checked exceptions like IOException is fine
]]></description>
<expected-problems>0</expected-problems>
<code><![CDATA[
import java.io.IOException;
public class Foo {
Foo() throws IOException{}
}
]]></code>
</test-code>
<test-code>
<description><![CDATA[
constructor throws RuntimeException
]]></description>
<expected-problems>1</expected-problems>
@ -72,8 +85,6 @@ interface method throws RuntimeException
]]></description>
<expected-problems>1</expected-problems>
<code><![CDATA[
import java.lang.RuntimeException;
public interface Foo {
public void method1() throws RuntimeException;
}