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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • xunit-plugin
    • None
    • Windows XP
      Hudson 1.374
      xunit 1.7
      boost test 1.39

    Description

      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'.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: