SonarCommunity/sonar-cxx — pull request #20 by jmecosta (2013-03-15 11:14:03+00:00)
Title: Improve bullseye tests, include case where coverage is in another file and it brakes the coverage build

Lets try again, now if you dont patch the bullseye sensor the tests will fail. One thing i notice the normally tests for the normal coverage are not testing if the test is in a test directory or not. So they report much more measures than they should. Also they are reporting measures even with the resources not found in the locally. As the mock always returns a valid resource even when a null is passed to the getResource Function

You will need to fix the test utils, as been line ending settings are again mixed. thought i had commit as unix line endings, apparently not. In this part ive only added the mock function

+ /**
+ * @return default mock project
+ */
+ public static Project mockVsProject() {
+ File baseDir;
+ baseDir = loadResource("/org/sonar/plugins/cxx/"); // we skip "SampleProject" dir because report dirs as here
+
+ List sourceDirs = new ArrayList();
+ sourceDirs.add(loadResource("/org/sonar/plugins/cxx/SampleProjectWindows/sample/"));
+
+ List testDirs = new ArrayList();
+ testDirs.add(loadResource("/org/sonar/plugins/cxx/SampleProjectWindows/sample.test/"));
+
+ return mockProject(baseDir, sourceDirs, testDirs);
+ }

Ive remove the old bullsye files has there we no source files in the samples to check against so not relevant test files.

You can close the other pull request.

Thanks

Jorge Costa