Browse Source

* Patch from Dean Zobec for BoolToStr changes

git-svn-id: trunk@6461 -
michael 18 years ago
parent
commit
11ab5d496d
1 changed files with 6 additions and 1 deletions
  1. 6 1
      fcl/fpcunit/xmltestreport.pp

+ 6 - 1
fcl/fpcunit/xmltestreport.pp

@@ -79,7 +79,12 @@ begin
   n := FDoc.CreateElement('Test');
   n['Name'] := ATest.TestName;
   n['Result'] := 'OK';
-  TDOMElement(FSuitePath[FSuitePath.Count -1]).AppendChild(n);
+  if FSuitePath.Count > 0 then
+  //test is included in a suite
+    TDOMElement(FSuitePath[FSuitePath.Count -1]).AppendChild(n)
+  else
+  //no suite to append so append directly to the listing node
+    FListing.AppendChild(n);
   FCurrentTest := n;
 end;