dlang-community / Pegged

A Parsing Expression Grammar (PEG) module, using the D programming language.
534 stars 66 forks source link

pegged.tester.main un-necessary #111

Closed timotheecour closed 11 years ago

timotheecour commented 11 years ago

you can do this instead: rdmd --main -unittest pegged/grammar rdmd --main -unittest pegged/peg

or just make a pegged.tester.main that only imports, without needed a main() ; right now i think your pegged.tester.main will also call std.stdio's unittests

PhilippeSigaud commented 11 years ago

I use main() for much more than just testing import & compilation. Most of the time, I do the real testing there before moving it elsewhere. Does its presence bothers you?

timotheecour commented 11 years ago

nah, just that it's idiomatic to use --main for this kind of unittest purposes.