[Cppunit-devel] RE: Help regarding Unit Test
Brought to you by:
blep
From: King D. <dal...@th...> - 2003-03-17 14:38:57
|
> Message: 1 > Date: Fri, 14 Mar 2003 09:28:50 -0800 (PST) > From: Dk Pat <pat...@ya...> > To: cpp...@li... > Subject: [Cppunit-devel] Help regarding Unit Test > > Hi, > I have developed some mathematical functions which > is both compatible to C/ C++ and are running under > Linux machine. I have not written the assertion macros > in the .C files. > > Now my question is : > > 1. Is is possible to pass the source file (.c/ > .cpp) as a parameter to any standard function/ command > of CppUnit s/w for the testing without adding the > macros and classes to the .c/ .cpp file ? Not sure if I completely understand your question, but what I have done when testing a C file is to create a wrapper file for the file being tested. That wrapper includes the file to be tested and contain any definitions include you need to use it in your testing environment. If the file is compilable in C++ I will use a C++ wrapper file and put the file to be tested in its own namespace. ---------------------------------------------------------------------------- ---- As of February 12th, 2003 Thomson unified its email addresses on a worldwide basis. Please note my new email address: dal...@th... http://www.thomson.net/ |