N
nandakumar.raghu
Hi,
I am creating a #defined class like -
#define BEGIN_TEST_MAP(testmapname) class testmapname\
{\
testmapname(){}\
testmapname(std:fstream resultfile)\
{\
resultfile << "<Test name=\"" << #testmapname << "\"\n";
#define TEST_CASE(_test_case)\
resultfile << _test_case();
#define END_TEST_MAP \
resultfile << "</Test>";\
}\
};\
Now I want to create a global object for this class. How can I do this?
When I write
testmapname objectname(resfile);
then the compiler gives testmapname undefined and takes it as int.
so how do i create an object of this class. I only need to call the
constructor of this class.
Thanks
Nandakumar
I am creating a #defined class like -
#define BEGIN_TEST_MAP(testmapname) class testmapname\
{\
testmapname(){}\
testmapname(std:fstream resultfile)\
{\
resultfile << "<Test name=\"" << #testmapname << "\"\n";
#define TEST_CASE(_test_case)\
resultfile << _test_case();
#define END_TEST_MAP \
resultfile << "</Test>";\
}\
};\
Now I want to create a global object for this class. How can I do this?
When I write
testmapname objectname(resfile);
then the compiler gives testmapname undefined and takes it as int.
so how do i create an object of this class. I only need to call the
constructor of this class.
Thanks
Nandakumar