Closed
Description
Sorry @kitlangton, I mentioned this on the Discord but took me a while to get back to it to create a small reproducer. The NullPointerException
started happening with 1.0.12. It looks like it happens when trying to introspect fields in case classes that are null. For example:
test("foo") {
assertTrue(Foo(null, 1) == Foo("a", 1))
}
will produce:
zio.FiberFailure: Fiber failed.
An unchecked error was produced
java.lang.NullPointerException
at zio.test.PrettyPrint$.apply(PrettyPrint.scala:45)
at zio.test.PrettyPrint$.$anonfun$apply$4(PrettyPrint.scala:32)
at scala.collection.Iterator$$anon$9.next(Iterator.scala:575)
at scala.collection.immutable.List.prependedAll(List.scala:153)
at scala.collection.IterableOnceOps.toList(IterableOnce.scala:1251)
at scala.collection.IterableOnceOps.toList$(IterableOnce.scala:1251)
at scala.collection.AbstractIterator.toList(Iterator.scala:1288)
at zio.test.PrettyPrint$.apply(PrettyPrint.scala:31)
at zio.test.FailureCase$.$anonfun$renderFailureCase$6(Result.scala:140)
...
This only happens with the smart asserts.
Metadata
Metadata
Assignees
Labels
No labels