I have returned to C++ after more than a 10 year absence and am using ccpunit for the first time. I have been trying to set up a test environment by following CppUnit - The Unit Testing Library document, and it does not appear that setup is called in TextFixture. Here is my code, first the file qsotest.h, then the file containing main:
When I compile and link, then execute, I get a Segmentation fault in testAddField because q is 0. If I comment out the code in setup and teardown, and uncomment the two lines in testAddField, the program executes and I get the result I expect.
Am I missing something? I compile and link using g++ on a system running openSuSE 11.2, using whatever version of software that is in the OpenSuSE repositories.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-04-22
Try to change "void setup()" na "void setUp()".
C++ is case sensitive…
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have returned to C++ after more than a 10 year absence and am using ccpunit for the first time. I have been trying to set up a test environment by following CppUnit - The Unit Testing Library document, and it does not appear that setup is called in TextFixture. Here is my code, first the file qsotest.h, then the file containing main:
When I compile and link, then execute, I get a Segmentation fault in testAddField because q is 0. If I comment out the code in setup and teardown, and uncomment the two lines in testAddField, the program executes and I get the result I expect.
Am I missing something? I compile and link using g++ on a system running openSuSE 11.2, using whatever version of software that is in the OpenSuSE repositories.
Try to change "void setup()" na "void setUp()".
C++ is case sensitive…
Thanks. I thought it had to be something simple; I don't know why I missed that.