Create assertion error records
There are places in ltest that have to do some very ugly destructuring:
- https://github.com/lfex/ltest/blob/ff9d44e312c82af7a7096689e435c7567eeb1f71/src/ltest.lfe#L146
This is due to Erlang having some pretty ugly (also probably quite old) error-creation for assertions, e.g.:
- https://github.com/erlang/otp/blob/d6285b0a347b9489ce939511ee9a979acd868f71/lib/stdlib/include/assert.hrl#L298
Let's create some records (just the ones that are necessary) to at least keep our code clean.
These are going to need LOTS OF TESTS.
This will show other similar ugly spots: git grep ',_ ,_' (all in the listener code).
Two of these are errors.
One is an ok.
Four are descriptions of ebins / modules.
One is test data.
These could all use some records ...
I'm not 100% convinced about the usefulness of this, really ...
In theory, sounds great, but in practice, I'm not sure it would be used much. Maybe in one or two places with little impact?