Skip to content

function enumeration utility based on regexps #24

@richcarl

Description

@richcarl

EUnit is already using regexps to enumerate functions (as funs) based on regexps, so it should be easy to make this a utility function for anyone to use. It is particularly useful for "with"-tests (abstract test functions). Right now you need to list these by hand, as in:

foo_test_() ->
  {setup,
   fun new_connection/0,
   fun close_connection/1,
   {with,
    [fun test_util:foo_test/1,
     fun test_util:bar_test/1,
     fun test_util:baz_test/1
    ]}
  }.

It would be nicer to just use an enumerator for the with-body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions