Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] CppUnit integration

Hi !
 
Following the last confcall, and whether CppUnit would be a separate project or not.
Looking at Java, for Eclipse 2.0.1, there are the following plug-ins:
       1 - org.junit  -> The JUnit framework. No extension, no extension point, just a Jar.
       2 - org.eclipse.jdt.junit -> An integration of the JUnit framework in the JDT.
 
The plugin #2 is part of the Jdt, because it extensively uses the JDT and Java launch configurations.
It is part of the Java Development Tooling.
From this, my idea was to contribute an org.eclipse.cdt.cppunit plugin, which would be an integration of the CppUnit framework in the CDT. It would allow basically to do the same things than the jdt.junit plugin.
 
From this, the CDT works the same without this plugin. But making a parallel with the JDT, my thought is that it can be part of the CDT.
 
Then the question is "Does the CppUnit framework itself should be part of the CDT or not".
We could say no, (the user would then have to specify the location of the CppUnit includes and libs), or we could say that the CppUnit libs and includes would be delivered in a platform fragment (org.eclipse.cdt.cppunit.[linux,solaris,win32]) which must exists whatever we choose because it contains a specific TestRunner (written in C++ and linked with the test program the Java equivalent is org.eclipse.jdt.junit.runner.RemoteTestRunner.java).
 
In addition, from what I saw, the CppUnit 1.8.0 is not available for Cygwin, (for Windows, Microsoft), but I've compiled the sources with not too much problems.
 
Thoughts/Ideas/Advices on this welcome
 
Thanks in advance
 
Martin
 
More about the plugin:
 
It would allowing a CDT-User to do basically the same than for JUnit, which is:
- Generate a template test driver (through a wizard). The user then has to edit it as a regular class,
- Build it !!( Soon with a new builder there !! - the first version i propose is  to generate a piece of makefile, and a make target).
- Execute it (extend the C/C++ Local Launch Configuration, to propose a specific shortcut Run As CppUnit which opens the result view and waits for the result on a Socket, and
- Display the result in a specific view.
This plugin would be using the cdt.core.model, the future builder, and others.

Back to the top