Merge pull request #241 from fiddlerwoaroof/fix/djcn-canonical-debug
Make Model's Debug exhaustive and the Debug fingerprint canonical across instances (improvise-djcn)
This commit is contained in:
@@ -205,6 +205,28 @@ Row, swapping the axes and rotating Row→Column land on the same view, and an
|
||||
equivalence test that cannot distinguish the wrong effect from the right one
|
||||
proves nothing (`doctrine(check_the_checker)`).
|
||||
|
||||
**The fixture needs cells and multi-entry view maps too (improvise-djcn).** The
|
||||
test compares `format!("{:?}", workbook)` across **two** `App`s. It passed only
|
||||
because the fixture had no cells and every view map had at most one entry, and a
|
||||
`HashMap` of one entry has only one order. The fixture now carries:
|
||||
- three cells;
|
||||
- two page selections;
|
||||
- two categories with hidden items, one of them with two;
|
||||
- two categories with collapsed groups.
|
||||
|
||||
That fixture was red in 3 of 3 runs on the old `Debug` impls: the by-key and
|
||||
by-command fingerprints differed only in hash order. It was green after the fix.
|
||||
|
||||
Each half of the fix was checked by restoring the derived `Debug` on its own:
|
||||
- `View`'s derived `Debug` alone: 3 of 3 runs red.
|
||||
- `DataStore` and `SymbolTable`'s derived `Debug` alone: 3 of 3 runs red.
|
||||
|
||||
So neither half is carried by the other. The exhaustive destructure in `Model`'s
|
||||
`Debug` has no test of its own, because it is a compile-time guard. It was
|
||||
checked by adding a `probe_field` to `Model` and to `Model::new`. The build then
|
||||
failed with `E0027: pattern does not mention field probe_field` at the `Debug`
|
||||
impl, and nowhere else.
|
||||
|
||||
### a_stale_wire_model_command_cannot_be_applied
|
||||
|
||||
A wire `Command::Model` cannot reach the document without its basis being checked
|
||||
|
||||
Reference in New Issue
Block a user