Ad
  • Custom User Avatar

    You can get some info from tests by printing to console: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution#how-can-i-see-which-input-causes-my-solution-to-fail

    Since somewhat recently I've been trying to promote a bit stricter policy regarding explicit, clear assertion messages, and it seems to gain some traction among authors and translators. Unfortunately it's not as widespread yet as I'd like to, and some testing frameworks do not even allow for it :( In such cases, print-debugging can come helpful.

  • Custom User Avatar

    Can we get better assert feedback? http://www.mikedeluna.com/better-test-failure-feedback-with-assertthat/

    I'm getting this error, it has littoraly no useful info that I can see? It's happening in random, but I don't know why, makes this test feel pretty buggy...

    	at org.junit.Assert.fail(Assert.java:86)
    	at org.junit.Assert.assertTrue(Assert.java:41)
    	at org.junit.Assert.assertTrue(Assert.java:52)
    	at PokerHandTests.randomizedTest(PokerHandTests.java:90)
    	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.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)```
    
  • Custom User Avatar

    This problem need a test case to check that it doesn't add empty pages. This should not pass. Phaelax put that comment 4 years ago still not fixed.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution