class: Builder::CoverageReportFormat
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 26 Jun 2013 23:47:46 +0200
changeset 182 556ad4c2c381
parent 181 1a72934569a6
child 183 4e6fc1b6c282
class: Builder::CoverageReportFormat
reports/Builder__CoverageReportFormat.st
--- a/reports/Builder__CoverageReportFormat.st	Wed Jun 26 23:42:14 2013 +0200
+++ b/reports/Builder__CoverageReportFormat.st	Wed Jun 26 23:47:46 2013 +0200
@@ -113,8 +113,8 @@
 
     className := class name.
     classFileName := class isPrivate 
-                        ifTrue:[Smalltalk fileNameForClass: class topOwningClass]
-                        ifFalse:[classFileName := Smalltalk fileNameForClass: class].
+                        ifTrue:[(Smalltalk fileNameForClass: class topOwningClass) , '.st']
+                        ifFalse:[(Smalltalk fileNameForClass: class) , '.st'].
     class package ~~ currentPackage ifTrue:[
         classFileName := 'extensions.st'
     ].
@@ -130,6 +130,7 @@
     stream nextPutLine:'        </class>'
 
     "Created: / 25-06-2013 / 12:29:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 26-06-2013 / 17:46:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 writeFooter
@@ -143,10 +144,19 @@
     stream nextPutAll:'<?xml version="1.0"?>
 <!!--DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-03.dtd"-->
 
-<coverage line-rate="1.0" branch-rate="1.0" version="1.9" timestamp="'; nextPutAll: Timestamp now utcSecondsSince1970 printString; nextPutAll:'">
-  <packages>'
+<coverage line-rate="1.0" branch-rate="1.0" version="1.9" timestamp="'; nextPutAll: Timestamp now utcSecondsSince1970 printString; nextPutLine:'">'.
+    stream nextPutLine:'  <sources>'.
+    Smalltalk packagePath do:[:each|
+        stream 
+            nextPutAll: '<source>';
+            nextPutAll: each asFilename asAbsoluteFilename pathName;
+            nextPutAll: '</source>';
+            cr.                
+    ].
+    stream nextPutLine:'  </sources>'.
+    stream nextPutLine:'  <packages>'.
 
-    "Modified: / 25-06-2013 / 11:56:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 26-06-2013 / 17:50:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 writeLine: lineNr hits: nhits
@@ -197,7 +207,7 @@
 
 writeMethod: method with: content
 
-    stream nextPutLine:'        <method name="'; nextPutAll: method selector; nextPutAll: '" signature="()" line-rate="1.0" branch-rate="1.0" complexity="1.0">'.
+    stream nextPutLine:'        <method name="'; nextPutAll: method selector; nextPutAll: '" signature="" line-rate="1.0" branch-rate="1.0" complexity="1.0">'.
     stream nextPutLine:'          <lines>'.
     currentMethod := method.
     content value.          
@@ -206,6 +216,7 @@
     stream nextPutLine:'        </method>'
 
     "Created: / 25-06-2013 / 12:59:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 26-06-2013 / 18:22:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 writePackage: packageName with: aBlock