Error at XML output with FSharp.Net

Bug #507532 reported by Pitta
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
Medium
Charlie Poole

Bug Description

Both console and gui runner, nunit version: 2.5.3.9345

The exception:

Unhandled Exception:
System.ArgumentException: Cannot have ']]>' inside an XML CDATA block.
   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.SaveTestResult(TestResult result)
   at NUnit.ConsoleRunner.ConsoleUi.CreateXmlOutput(TestResult result)
   at NUnit.ConsoleRunner.ConsoleUi.Execute(ConsoleOptions options)
   at NUnit.ConsoleRunner.Runner.Main(String[] args)

The message caused by:
Rsxnlyz+TestType.Test:
  Expected: <Microsoft.FSharp.Collections.FSharpList`1+_Cons[Microsoft.FSharp.Core.Tuple`2[FSharpTools.ResourceAnalyzer.AdapterTypes+Ident,FSharpTools.ResourceAnalyzer.AdapterTypes+Exp]]>
  But was: <True>

Related branches

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)

Changed in nunitv2:
milestone: none → 2.5.4
assignee: nobody → Charlie Poole (charlie.poole)
importance: Undecided → Medium
status: New → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.