Shaun C D’Souza. Eclipse cdt code analysis and unit testing. PeerJ Preprints, 6:e27350v1, 2018. url: https://peerj.com/preprints/27350/
- Install Java JDK
- Set %JAVA_HOME% to jdk path
- Download Eclipse IDE for C/C++ Developers (Luna)
- Windows 64-bit
- https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/luna/SR2/eclipse-cpp-luna-SR2-win32-x86_64.zip
- Unzip in folder
- Set %ECLIPSE_HOME% to Eclipse folder path
- Navigate to jar folder
cd jar
- Execuate make batch script
..\make.bat
-
Copy generated ..\fakeunittest_1.0.jar in %ECLIPSE_HOME%\dropins
-
Start Eclipse. You should see a FakeSources button / Menu option (see images/eclipse_cdt.jpg)
- Create new C/C++ Project in Eclipse 'testcpp'
- Copy files, sub-directories in testcpp/* in C:\Users\user\eclipse-workspace\testcpp folder
xcopy eclipse-workspace\testcpp\* c:\Users\user\eclipse-workspace\testcpp\ /E
-
Update sample eclipse-workspace\testcpp\source.txt in project folder if using a new project name
- First line = #project name testcpp
- Second line = source file name src\b.cpp in eclipse-workspace\testcpp\src folder
-
Click FakeSources button. Navigate and select source.txt file
-
Fake Sources are generated in eclipse-workspace\testcpp folder
- Refer to debug.log
- Expected output is shown in "expected output in testcpp" folder