But are we not doing that for example for coding style rules? Imposing our
vision on how software should be done? I see this is a maintainability rule.


On Fri, Apr 5, 2013 at 9:39 AM, wenns <notifications@github.com> wrote:

> In
> sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/xunit/CxxXunitSensorTest.java:
>
> > +    // case 2:
> > +    // the testcase file resides: in a subdirectory
> > +    // the testcase file contains: a couple of classes
> > +    // the report mentions: the class name
> > +    assertEquals(sensor.getFilePath("TestClass2"), new File(baseDir, "tests1/subdir/Test2.cc").getPath());
> > +
> > +    // case 3:
> > +    // the testcase file resides: in second directory
> > +    // the testcase file contains: the class in a namespace
> > +    // the report mentions: the class name
> > +    assertEquals(sensor.getFilePath("TestClass3"), new File(baseDir, "tests2/Test3.cc").getPath());
> > +
> > +    // case 4:
> > +    // the testcase file resides: somewhere
> > +    // the testcase file contains: the class is implemented via a header and impl. file
> > +    // the report mentions: the class name
>
> On 04/05/2013 08:28 AM, Jorge Costa wrote: In
> sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/xunit/CxxXunitSensorTest.java:
> > + // case 2: > + // the testcase file resides: in a subdirectory > + //
> the testcase file contains: a couple of classes > + // the report mentions:
> the class name > + assertEquals(sensor.getFilePath("TestClass2"), new
> File(baseDir, "tests1/subdir/Test2.cc").getPath()); > + > + // case 3: > +
> // the testcase file resides: in second directory > + // the testcase file
> contains: the class in a namespace > + // the report mentions: the class
> name > + assertEquals(sensor.getFilePath("TestClass3"), new File(baseDir,
> "tests2/Test3.cc").getPath()); > + > + // case 4: > + // the testcase file
> resides: somewhere > + // the testcase file contains: the class is
> implemented via a header and impl. file > + // the report mentions: the
> class name I think its a good practice to name the tests according to the
> functionality their are testing. Using your example, i would do 2 test
> classes one per platform. Either way, if mapping per method instead it will
> probably solve this issue
> I would too, probably. But thats a matter of style, ultimately. And we
> should not enforce a particular style, methinks. Rather the plugin should
> try to behave reasonably in all cases (without introducing too much logic,
> of course).
> … <#13dd8ec0cb839faa_>
>  > — Reply to this email directly or view it on GitHub <
> https://github.com/SonarCommunity/sonar-cxx/pull/22/files#r3668595>.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/SonarCommunity/sonar-cxx/pull/22/files#r3668648>
> .
>