Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-7335

Test function name containing < and > is not considered valid.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • xunit-plugin
    • None
    • Windows XP
      Hudson 1.374
      xunit 1.7
      boost test 1.39

      We test templated c++ functions using boost test's template binding test tool BOOST_AUTO_TEST_CASE_TEMPLATE. This results in the names of the unit tests containing the templated parameter type, e.g. TestExample<int>, TestExample<double>. These names appear in the output XML like so:

      <TestCase name="TestExample<int>">
      ...
      ...
      </TestCase>

      When xunit comes to parse this, the following error is raised:

      [xUnit] [WARNING] - At line 1 of file:/D:/Develop/boost-test-TestGeneral.xml:cvc-datatype-valid.1.2.1: 'TestAddX<int>' is not a valid value for 'NMTOKEN'.
      [xUnit] [WARNING] - At line 1 of file:/D:/Develop/boost-test-TestGeneral.xml:cvc-attribute.3: The value 'TestAddX<int>' of attribute 'name' on element 'TestCase' is not valid with respect to its type, 'NMTOKEN'.

            gbois Gregory Boissinot
            rioch rioch
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: