unhandled exception - Within CPPUNIT_ASSERT, Keep Getting Access Violation -
i have set of classes trying apply unit tests, maintain current utility through future revisions.
my problem within cppunit, new, where-ever call cppunit_assert ( [condition] ), met error unhandled exception...: access violation @ 0xffffffffffffffff.
this happens write simplest test case
int main(){ cppunit_assert ( true ); }
i have tried calling testing functions manual calls, adding them registry, done in money example. problem reportedly arises within constructor sourceline, filename string expects bad pointer.
after bit of search i've found called within cppunit_assert, it's macro following definition
#define cppunit_assert(condition) \ ( cppunit_ns::asserter::failif( !(condition), \ cppunit_ns::message( "assertion failed", \ "expression: " #condition), \ cppunit_sourceline() ) )
i've searched tutorials on cppunit's site, , scrutinised stackoverflow, have not found addresses in particular. find strange is, in every example i've seen, single-parameter function (assert), call function no arguments (sourceline) macro assuming receives string, can receive no such thing. found sourceline class still has default constructor, above called macro, refers 2-parameter constructor, passed no arguments can see. @ loss.
i using 64 bit compilation of cppunit, verified dumpbin, , visual studio 2008.
cppunit's assertion system uses macros expected simple example complains unhandled exception.
normally don't use assertion outside of test method. suggest have @ cppunit cookbook provides information , examples how use cppunit.
Comments
Post a Comment