google / google/truth

ThrowableSubject does not provide access to suppressed exceptions

Open
#717 1 comment 1 reaction 0 assignees View on GitHub
P3 type=addition
Dominant language
Java
Stars
2.8k
Forks
275
Avg merge
7m
Merged PRs (30d)
4

Description

I'm testing a testing library which aside from hurting my brain I have a need to assert on the suppressed exceptions which are coming out attached to the exceptions my library throws.

This is a Java 7 feature, so I'm not sure how you'd go about exposing it without requiring that I do `Truth8.assertThat(throwable)`, but being able to do this is far more useful than how exactly it works. Especially given that I no longer have access to the underlying `Throwable` from the subject to do something like `assertThat(throwable.suppressed[0]).isSameInstanceAs(other)`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.