New bugs
Robert Field
robert.field at oracle.com
Tue Mar 3 20:53:07 UTC 2015
On 03/03/15 12:21, andrei.eremeev wrote:
> Hi REPL team,
>
> 1. /c or /classes prints "class" for enums and annotations, while
> "interface" is printed for interfaces.
> -> @interface A {}
> | Added annotation interface A
>
> -> /c
> | class A
>
> -> enum A {}
> | Replaced enum A
>
> -> /c
> | class A
>
> -> interface A {}
> | Replaced interface A
>
> -> /c
> | interface A
Thanks for the test and TODO. Fortunately that will be easy to fix ;-)
>
> 2. IllegalArgumentException is not thrown when currentDeclaration is
> called on the snippet declared in another state.
> See the provided example (The appropriate test will be pushed soon).
>
> SnippetInfo info = assertEval1("class A { void f() {} }");
> EvalProcessing evalProcessing =
> EvalProcessing.create(newTestingInputStream(),
> newPrintStream(newByteArrayOutputStream()),
> newPrintStream(newByteArrayOutputStream()));
> try(EvalState state = evalProcessing.evalState()) {
> List<EvalResult> results = state.eval("class A { int f() { return
> 0; } }");
> assertEquals(results.size(),1,"Too much snippets");
> EvalResult result = results.get(0);
> assertTrue(result.outcome.success,"Compilation failed");
> state.currentResolution(info.key());
> }
Thanks for the test and TODO.
>
> 3. It looks like addToClasspath is broken, REPL cannot find any
> classes added to classpath.
My ad hoc tests worked. Given that testing this needs side files,
wasn't sure of the "right" way to add to the test framework. Can you
add tests that show it failing?
Thanks,
Robert
>
> Andrei Eremeev
More information about the kulla-dev
mailing list