This is awesome Jan.
If I read the EUnits docs correctly you can do both, have them in the
files as well as in separate file. I believe if you run eunit:test
([some_module]) it will run both tests in the module as well as look
for some_module_tests and run those also.
I think there are some modules where the amount of complexity among
all the private methods warrants tests in the modules, and others
where tests outside are more practical.
I'm mixed on whether to strip the code or not. For programmers tests
are good way to learn the code. Perhaps there could be separate
distributions for development versus deployment.
I think EUnit is now baked into Erlang so the license shouldn't be an
issue. I would imagine the LGPL would be compatible with Apache2.0, I
know the GPLv3 is. The apache foundation must have a lawyer or two
who could answer this.
Regards,
Bob
On Feb 15, 2009, at 6:51 PM, Jan Lehnardt wrote:
On 15 Feb 2009, at 23:32, Damien Katz wrote:
On Feb 14, 2009, at 8:15 PM, Jan Lehnardt wrote:
--
What do you think?
This is awesome! My only question is do the tests have to live in
their own file? I'd prefer they can be in the same file, but it's
fine if not.
Heh, I went the extra mile to put them in their own
directory because people here voiced preference.
They can live in the code files just fine. It's just a
matter of putting them there.
I don't want to call a formal vote on that, but this
is your (d...@-community's) chance to bikeshed
this decision :)
Should we keep EUnit-tests for modules in the
module's source files or in a separate tests/
directory? And why?
We can still have a separate tests/ directory for
functional erlang tests, if we ever get them
(I hope we do).
Cheers
Jan
--