Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement soft assertion #6

Open
oknozor opened this issue Nov 6, 2021 · 1 comment
Open

Implement soft assertion #6

oknozor opened this issue Nov 6, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@oknozor
Copy link
Owner

oknozor commented Nov 6, 2021

it would be nice to have soft assertions.

The API could look like this :

   let softly = SoftAssertions::new();
   softly.assert_that(mansion.guests()).as("Living guest").is_equal_to(7);
   softly.assert_that(mansion.kitchen()).as("Kitchen").is_equal_to("clean");
   softly.asser_that(mansion.library()).as("Library").is_equal_to("clean");
   softly.assert_all();

resulting in the following :

 1) [Living Guests] expected:<[7]> but was:<[6]>
 2) [Library] expected:<"clean"> but was:<"messy">
 3) [Kitchen] expected:<"clean"> but was:<"dirty">
@ms-ati
Copy link

ms-ati commented Dec 26, 2022

How does this compare to https://github.com/google/googletest-rust ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants