You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
privatedefflop= async { assert(false, "this is FALSE") } // <--- SomeTests.scala:14@Testdeftwo= async {
valx= await(op)
valy= await(flop).toString
valz= await(op)
valw= x + z
y + w
}
Currently the stack trace reported looks like this:
java.lang.AssertionError: assertion failed: this is FALSE
at scala.Predef$.assert(Predef.scala:165)
at com.rolandkuhn.asynctest.SomeTests$$anonfun$com$rolandkuhn$asynctest$SomeTests$$flop$1.apply$mcV$sp(SomeTests.scala:14)
at com.rolandkuhn.asynctest.SomeTests$$anonfun$com$rolandkuhn$asynctest$SomeTests$$flop$1.apply(SomeTests.scala:14)
at com.rolandkuhn.asynctest.SomeTests$$anonfun$com$rolandkuhn$asynctest$SomeTests$$flop$1.apply(SomeTests.scala:14)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.liftedTree1$1(Future.scala:24)
at scala.concurrent.impl.Future$PromiseCompletingRunnable.run(Future.scala:24)
at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.pollAndExecAll(ForkJoinPool.java:1253)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1346)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
It would be nicer if we could somehow wrap the exception at the line which contains await(flop), giving the user a better clue what went wrong.
The text was updated successfully, but these errors were encountered:
Consider the following test case:
Currently the stack trace reported looks like this:
It would be nicer if we could somehow wrap the exception at the line which contains
await(flop)
, giving the user a better clue what went wrong.The text was updated successfully, but these errors were encountered: