Ad
  • Default User Avatar
  • Custom User Avatar

    Fixed, thanks for reminding me :-)

  • Custom User Avatar

    Ok, it's the very same issue than below: the description is still lacking the information that, to be invalid, a procedure has to actually be executed: the procedure is'nt actually executed, so the infinite loop never occurs. Hence, this program should be considered valid.

    @Donald: don't forget to update the description, this time...?

  • Default User Avatar

    @Blind4Basics @donaldsebleung thanks for the quick reply. So yes, sorry, the language is Java. I will try to describe the situation as best as I can.
    So forexample, the following RS code: LL1(R3L3)17L9RF9F3((F3RF5L)4R9)4FFRL9(L7F)9FL5L0L(R2L)5L1FL4L(L(F8LF13RRRF12LF2L)2)18RLP711p520P520F7L(R0L)11LLF0F((F3RF5L)9F6)17L3F1qLF6(FF)10FF7p711F8L5(F1(F8LF13RRRF12LF2L)8)4F9RLL8((F3RF5L)0L)19LF1qF0L9(F5L)11LL0

    The program should throw a RuntimeError because the "p520P520F7L(R0L)11LLF0F((F3RF5L)9F6)17L3F1q" method is illegal.
    I have tried throwing the RuntimeError at different levels of the method hierarchy, but the Random tests always mark the test as "Test Failed", with the following stack trace. I have also tried catching it at different levels, with no success

    java.lang.RuntimeException
    at RoboScript.expandMethods(RoboScript.java:325)
    at RoboScript.getMethods(RoboScript.java:364)
    at RoboScript.execute(RoboScript.java:206)
    at SolutionTest.assertPathEquals(SolutionTest.java:17)
    at SolutionTest$RandomTests.test(SolutionTest.java:357)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:27)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
    at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:40)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
    at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
    at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:80)
    at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:71)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:229)
    at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:197)
    at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:211)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:191)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
    at io.qualified.junit5.RunTests.main(RunTests.java:25)

  • Custom User Avatar

    that's Java.

    @donald: I just updated a minor thing in the kata (nothing meaningful tho) / EDIT: did you update the description? (see the opened issue just below)

    @kianfay:

    • inputs?
    • error messages?

    Without that, it's impssible to help. Normally, the tests are correct, So I'd bet on a problem on your side, tho, if you can pass the random ones, that might mean that they are lacking some kind of input generation profile ...

  • Custom User Avatar

    @kianfay00,

    Thanks for the Issue report - may you please provide additional details such as the language you are attempting the Kata in and the particular test case(s) (i.e. the input program) that you say is/are supposed to throw a RuntimeException but is/are not handled correctly by the Submit tests?

    Cheers,
    @donaldsebleung

  • Default User Avatar

    Hey, my issue is that all my random tests which are completable complete, if that makes sense. However, in the cases where a RuntimeException should be thrown, it is thrown but an error comes up, and the program does not recognize that the exception which has been thrown is what was asked for. I have tried some different approaches but cannot find the problem. Thanks in advance.