RFR: 8305714 : Add an extra test for JDK-8292755 [v2]

Weibing Xiao duke at openjdk.org
Thu May 4 17:35:23 UTC 2023


On Thu, 4 May 2023 14:57:37 GMT, Sean Coffey <coffeys at openjdk.org> wrote:

>> Weibing Xiao has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   modify bug id
>
> test/langtools/jdk/jshell/UndefinedClassTest.java line 55:
> 
>> 53:                 " void run() throws Throwable;\n" +
>> 54:                 "\n" +
>> 55:                 " // You can also replace `static` with `default` and test again\n" +
> 
> why the comment in test code ? maybe you can create a 2nd test instead :
> 
> 
>     public void testUndefinedClass1() throws Exception{
>         String code = "@FunctionalInterface\n" +
>                 "interface RunnableWithThrowable {\n" +
>                 " void run() throws Throwable;\n" +
>                 "\n" +
>                 " default RunnableWithThrowable getInstance() {\n" +
>                 " return () -> { throw new NotExist(); };\n" +
>                 " }\n" +
>                 "}";
>         // set terminal height so that help output won't hit page breaks
>         System.setProperty("test.terminal.height", "1000000");
>         doRunTest((inputSink, out) -> {
>             inputSink.write(code + "\n");
>             waitOutput(out, "NotExist");
>         });
>     }

Updated the summary. And I remove the code to set the terminal height. I don't think it is necessary since there are only two lines for the print-out.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13719#discussion_r1185311268


More information about the kulla-dev mailing list