Comment 1 for bug 507532

Revision history for this message
Zoomzap (tagdev) wrote :

Got the same error on NUnit version 2.5.2.9222, but unrelated to F#, and it also seems related to bug #419106.

To reproduce, one can use the following test:

[Test]
public void ReproduceErrorPopupWithinNUnit()
{
    Assert.That(123, new NUnit.Framework.Constraints.ExactTypeConstraint(typeof(System.Collections.Generic.List<bool?>)));
}

I got the following popup and exception details:

NUnit Test Run Failed
System.ArgumentException: Cannot have ']]>' inside an XML CDATA block.
System.ArgumentException...
   at System.Xml.XmlTextWriter.WriteCData(String text)
   at NUnit.Util.XmlResultWriter.WriteCData(String text)
   at NUnit.Util.XmlResultWriter.WriteFailureElement(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteResultElement(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteChildResults(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteResultElement(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteChildResults(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteResultElement(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteChildResults(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteResultElement(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteChildResults(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteResultElement(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteChildResults(TestResult result)
   at NUnit.Util.XmlResultWriter.WriteResultElement(TestResult result)
   at NUnit.Util.XmlResultWriter.SaveTestResult(TestResult result)
   at NUnit.Util.TestLoader.SaveLastResult(String fileName)
   at NUnit.Util.TestLoader.RunFinished(TestResult testResult)