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

Compare any instances #46

Open
eliasson opened this issue Feb 19, 2020 · 0 comments
Open

Compare any instances #46

eliasson opened this issue Feb 19, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@eliasson
Copy link
Contributor

Support to match any instances are required.

The following test fails, since there is not equality check for type Data:

"for case classes":
      "can compare" in:
        class Data(value: Int)
        expect(Data(1)).toEqual(Data(1))
[error] /Users/markus/Development/factor10/dotty-intent/src/test/scala/intent/matchers/ToEqualTest.scala:117:41: no implicit argument of type intent.core.Eq[Data] was found for parameter eqq of method toEqual in trait ExpectGivens.
[error] I found:
[error]
[error]     this.tryEq[TInner, T]
[error]
[error] But method tryEq in trait EqGivens does not match type intent.core.Eq[Data].
[error]         expect(Data(1)).toEqual(Data(1))
[error]                                         ^
[error] one error found
[error] (Test / compileIncremental) Compilation failed
[error] Total time: 5 s, completed 19 feb. 2020 23:24:51

Preferably any types should be comparable with toEqual at least. Result should be a pretty-printed type and structural difference between expected and actual.

@eliasson eliasson added the enhancement New feature or request label Feb 19, 2020
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

1 participant