Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Unique path to nested test suites

Help
2010-03-05
2013-04-22
  • I'm using cppunit in an environment making intensive use of namespaces. For each namespace I create a test suite, which itself
    contains other test suites, i.e. the namespace hierarchy is reflected in the test suite hierarchy:

    ns1
      common
        some_stuff

    n2
      common
        other_stuff

    to corresponding unit test hierarchy is created using
     
    CPPUNIT_REGISTRY_ADD_TO_DEFAULT("ns1");
    CPPUNIT_REGISTRY_ADD("common", "ns1");
    CPPUNIT_REGISTRY_ADD("some_stuff", "common");
    CPPUNIT_REGISTRY_ADD("specific", "ns1");

    CPPUNIT_REGISTRY_ADD_TO_DEFAULT("ns2");
    CPPUNIT_REGISTRY_ADD("common", "ns2");
    CPPUNIT_REGISTRY_ADD("other_stuff", "common");

    this won' t work as expected, as "common" in not unique.

    my question is if cppunit provides a way to specify the path of a parent suite using a unique id, like "ns1/common" (i tried this one, but without success)