views:

154

answers:

2

I've follow the tutorial on http://cxxtest.com/index.php?title=Visual_Studio_integration and I've looked on google but found nothing.

When I try to lunch 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 the step 7 of the tutorial and all my setting are set exactly as they are on the tutorial.

this is the 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 it be the problem?

A: 

Try running the cxxtestgen.py on command line. Does it print the usage page?

Nikolai N Fetissov
No it does not, it show me the same error message.
Drahakar
Can you show the command line?
Nikolai N Fetissov
+3  A: 

You appear to be using Python 3.0 on a body of code which is not ready for python 3.0 - your best bet is to downgrade 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

TML
"fixed"? What's wrong with using python 2.6?
Tom
Is that better?
TML
Yes, much better. (^:
Tom