Unittests not firing?

Mike Brown mikey.be at gmail.com
Fri Jun 11 14:54:33 UTC 2021


Hi all,

I'm testing the unittest features of D, and having some issues. I 
only seem able to fire one unittest, e.g.

module test;

     unittest {
     	assert(0);
     }

     unittest {
     	assert(0);
     }

If I run,
rdmd -g -unittest -main "test.d"

It returns,
1/1 unittests FAILED
test.d(4): [unittest] unittest failure

Im using rdmd as I want a simple command that will pull in 
dependancies to run these tests. Am I right in using rdmd?

I have also tried ldc2 and getting the same results. What am I 
missing?

Kind regards,
Mike Brown


More information about the Digitalmars-d-learn mailing list