Are there any default dmd optimizations

Jacob Carlborg doob at me.com
Wed Feb 27 04:19:53 PST 2013


On 2013-02-26 21:24, H. S. Teoh wrote:

> But D's built-in unittests, for all their warts and shortcoming, have
> the benefit of being right there, ready to use, and guaranteed to be
> runnable by whoever is compiling the code (don't have to worry about
> people not having Expect/python/whatever installed, so contributors have
> no excuse to not run them, etc.).

I think that is one of the problems with unit tests in D. I don't know 
how to run them. It's just the -unittest flag, but that's not enough.

* How do I run all the unit test in all of my files? Some will have a 
shell script called "test.sh", some will call it "unittest.sh". How do I 
then run the test on Windows, I can run Bash scripts on Windows. Some 
will have a D file "test.d", what the h*ll should I do with that? 
Compile it? run it using RDMD?

* How do I run a single test?
* How do I run a subset of the tests?

The questions go on.

Using Ruby on Rails, the first thing I see when I clone a repository is 
either a "test" or a "spec" folder. These are run using "rake test" or 
"rake spec". All projects using these frameworks support running all 
test, a single test and a subset of test. And it's the same commands on 
for all projects on all platforms.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list