CxxTestgen.py throws a syntax error
I am following the cxxtest Visual Studio Integration tutorial and I looked through google but found nothing.
When I try to dine on a basic test with cxxtest and visual studio, I get this error:
1>Generating main code for test suite
1> File "C:/cxxtest/cxxtestgen.py", line 60
1> print usageString()
1> ^
1>SyntaxError: invalid syntax
I am at step 7 of the tutorial and all my settings are set exactly the same as in the tutorial.
this is a basic test script:
#include <cxxtest/TestSuite.h>
class MyTestSuite : public CxxTest::TestSuite
{
public:
void testAddition( void )
{
TS_ASSERT( 1 + 1 > 1 );
TS_ASSERT_EQUALS( 1 + 1, 2 );
}
};
Edit: I am using Python 3.0, could this be the problem?
a source to share
You seem to be using Python 3.0 on a piece of code that is not ready for python 3.0 - your best bet is to upgrade to python 2.6 until cxxtestgen.py works with python 3.0.
See http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function for details
a source to share
It is correct in the previous comments to note that CxxTest 3.x does not support Python 3.x. However, CxxTest 4.0 was recently released and supports Python 3.1 and 3.2.
See CxxTest homepage: cxxtest website
a source to share