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

Instantiate fields recursively #7

Closed
GoogleCodeExporter opened this issue Mar 29, 2015 · 2 comments
Closed

Instantiate fields recursively #7

GoogleCodeExporter opened this issue Mar 29, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

If the tested class contains fields of types that EqualsVerifier doesn't
know about (currently, it knows about the primitives, enum, String, and
Object), it can't instantiate them and they need to be supplied separately
using withPrefabValues.

It would be better if EqualsVerifier instantiates them automatically. This
is possible, since it can instantiate the tested class as well. It has to
instantiate all the fields recursively, until it hits a class that contains
only objects of known classes. (Maybe it can add instantiated objects to
the PREFAB_VALUES map as it goes along.)

Note: this will cause problems of the infinite loop variety with
(potentially) recursive data structures, such as graphs. It should be able
to detect this automatically, though.

Original issue reported on code.google.com by [email protected] on 16 Jul 2009 at 2:31

@GoogleCodeExporter
Copy link
Author

Fixed!
withPrefabValues is now only necessary for recursive data structures, and maybe 
one
or two weird corner cases that will hopefully get ironed out in the future :).

Original comment by [email protected] on 1 Aug 2009 at 6:51

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 1 Aug 2009 at 6:51

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant