google / google/truth

Make Expect throw ComparisonFailure when possible

Open
#543 2 comments 0 reactions 0 assignees View on GitHub
P3 type=enhancement
Dominant language
Java
Stars
2.8k
Forks
275
Avg merge
7m
Merged PRs (30d)
4

Description

Currently, it always throws `AssertionError`. But if there's only one failure and it's a `ComparisonFailure`, we should throw `ComparisonFailure`. Arguably we could throw `ComparisonFailure` even in the case of multiple failures, at least if only one input is a `ComparisonFailure`, though that's potentially confusing.

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.