View mode: basic / threaded / horizontal-split · Log in · Help
August 22, 2005
[OT] unittests for C similar to D's ones
What would be the best tool for unittest when I _have_ _to_ write in pure  
C? I love D
unittest and wish to use them in C too. What I especialy like about them  
is:
- being in same file as source;
- pure and clear form of asserts one over another;
- not having to create any special framework to use them (WTF are  
testcases and such?);

What I desire would be unittest coded some kind of C comments (smth. like  
those from
doxygen) interpreted with external tool and giving me an output like: "all  
unittest
passed"/"unittest XYZ failed HERE".

But what can I realy have? Any advices/experiences?
-- 
Dawid Ciężarkiewicz
August 22, 2005
Re: [OT] unittests for C similar to D's ones
Dawid Ciężarkiewicz wrote:
> What would be the best tool for unittest when I _have_ _to_ write in 
> pure  C? I love D
> unittest and wish to use them in C too. What I especialy like about 
> them  is:
> - being in same file as source;
> - pure and clear form of asserts one over another;
> - not having to create any special framework to use them (WTF are  
> testcases and such?);
> 
> What I desire would be unittest coded some kind of C comments (smth. 
> like  those from
> doxygen) interpreted with external tool and giving me an output like: 
> "all  unittest
> passed"/"unittest XYZ failed HERE".
> 
> But what can I realy have? Any advices/experiences?

I think the Digital Marc C/C++ compiler supports dbc (design by contract)
* looks for link

here:
http://www.digitalmars.com/ctg/contract.html
hmmm, now that I look at it, it doesn't support __unittest
Top | Discussion index | About this forum | D home