Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function enumeration utility based on regexps #24

Open
richcarl opened this issue Jul 7, 2012 · 0 comments
Open

function enumeration utility based on regexps #24

richcarl opened this issue Jul 7, 2012 · 0 comments

Comments

@richcarl
Copy link
Owner

richcarl commented Jul 7, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant