Package-level declarations

Types

Link copied to clipboard
abstract class ValueSemanticsSpec

The guard of the hand-written equals of a module's classes: a class that is not a data class and overrides equals lists the fields it compares by hand (valueFields(), or comparisons of its own), and a field added later and left out is not caught by the compiler. This spec builds an instance of each such class with every field set (bypassing its constructor), checks that an instance with the same fields is equal to it and has its hash code, and that changing any one field makes it unequal: a field equals does not compare fails the class, unless it is excluded with its reason.