ceylon/ceylon-sdk — pull request #158 by lucaswerkmeister (2013-11-30 18:42:05+00:00)
Title: ceylon.test: run Callables as tests

This allows to run Anything()s as tests. If you pack them into a tuple, you can also name them.

With this change, you can run a test function several times with different parameters, like this:
```ceylon
"Runs [[testFile]] for each file in [[testFileDirectory]]."
TestRunner runner = createTestRunner([
for (file in testFileDirectory.files())
[() => testFile(file), file.name]
// or, if you don’t care about the name:
// () => testFile(file)
]);
```

The code for the CallableTestExecutor is mostly copied from the MethodTestExecutor, with a lot of stuff that’s not possible on Callables (callbacks from annotations etc.) removed.

What do you think?