lfex / ltest

A Testing Framework for LFE (successor to lfeunit)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create assertion error records

oubiwann opened this issue · comments

There are places in ltest that have to do some very ugly destructuring:

This is due to Erlang having some pretty ugly (also probably quite old) error-creation for assertions, e.g.:

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?