kbilsted / StatePrinter

Automating unit testing and ToString() coding
Apache License 2.0
92 stars 31 forks source link

Root name fixing #38

Closed kbilsted closed 8 years ago

kbilsted commented 9 years ago

The way the root name is passed down to the introspector as a fieldname assumed that there would be a sane field to attach this name to. Im not convinced this is the case when the root object is a dictionary of simple types or an enumerable. eg. an empty one. how these are printed do not necesarily leave room for the field name.

maybe the root name should be applied explicitly after the introspection rather than pushing down the root name to the first field. This may break with existing token production.

kbilsted commented 8 years ago

fixed in #47