When I install the Eclipse CxxTest plugin and follow the instructions here (http://web-cat.cs.vt.edu/eclipse/cxxtest/) eclipse gives me the following output:
make all
Building file: ../runAllTests.cpp
Invoking: GCC C++ Compiler
g++ -I"/opt/eclipse/plugins/net.sf.webcat.eclipse.cxxtest.framework_1.7.0/runner-include" -I"/opt/eclipse/plugins/net.sf.webcat.eclipse.cxxtest.framework_1.7.0/include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"runAllTests.d" -MT"runAllTests.d" -o"runAllTests.o" "../runAllTests.cpp"
In file included from /opt/eclipse/plugins/net.sf.webcat.eclipse.cxxtest.framework_1.7.0/runner-include/dereferee-src/cxxtest_listener.cpp:26,
from ../runAllTests.cpp:46:
/opt/eclipse/plugins/net.sf.webcat.eclipse.cxxtest.framework_1.7.0/include/cxxtest/MemoryTrackingListener.h: In static member function ‘static void CxxTest::MemoryTrackingListener::sweepVisitor(Dereferee::allocation_info&, void*)’:
/opt/eclipse/plugins/net.sf.webcat.eclipse.cxxtest.framework_1.7.0/include/cxxtest/MemoryTrackingListener.h:77: error: cast from ‘void*’ to ‘unsigned int’ loses precision
In file included from ../runAllTests.cpp:46:
/opt/eclipse/plugins/net.sf.webcat.eclipse.cxxtest.framework_1.7.0/runner-include/dereferee-src/cxxtest_listener.cpp: In member function ‘virtual bool DerefereeSupport::cxxtest_xml_listener::should_report_leak(const Dereferee::allocation_info&)’:
/opt/eclipse/plugins/net.sf.webcat.eclipse.cxxtest.framework_1.7.0/runner-include/dereferee-src/cxxtest_listener.cpp:213: error: cast from ‘void*’ to ‘unsigned int’ loses precision
make: *** [runAllTests.o] Fehler 1
I am suspecting this has something todo with me using the 64-bit version of eclipse and ubuntu where it might not be save to assume that a void* has the same size as an unsigned int. Is this a bug or am I just doing something wrong?
It seems to be fixed in the current head, just has not made it into a release yet. I applied my own little fix to 1.70 now, which is obviously not the cleanest way to do this. Is it somehow possible to package the CVS head like the releases, as eclipse plugins?