Skip to content

Conversation

@epage
Copy link
Contributor

@epage epage commented May 15, 2018

No description provided.

epage added 2 commits May 14, 2018 21:50
This is a step towards assert-rs#7.  We can now display the expression under
test.

Next steps:
- Ellipsis the strings being reported from this change.
- Ability to enumerate failure cases.

I'm mixed about building this enumeration functionality directly into
`Predcate` or if we should instead provide an expanded trait that is
only implemented when `Predicate` is `Display` and `T` is `Debug`.  For
now, I'm going with the simplest implementation, to assume every
predicate will want this functionality.

BREAKING CHANGES:
- `Display` is now required to implement `Predicate`.
- Generic traits (taking `T`) now require `T` to be `Debug`.
This can be important for
- Clarifying the intent of a predicate, especially when looking at test
  results
- Shortening `Predicate::display`s that are too big

This is another step towards assert-rs#7.
@epage epage merged commit efd199b into assert-rs:master May 15, 2018
@epage epage deleted the eval branch May 15, 2018 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant