You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
|
Sep
(46) |
Oct
(102) |
Nov
(10) |
Dec
(21) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(1) |
Feb
(3) |
Mar
(14) |
Apr
(9) |
May
(12) |
Jun
(4) |
Jul
(40) |
Aug
(60) |
Sep
(38) |
Oct
(2) |
Nov
(1) |
Dec
(42) |
| 2008 |
Jan
(23) |
Feb
(29) |
Mar
(107) |
Apr
(27) |
May
(3) |
Jun
(1) |
Jul
(15) |
Aug
(7) |
Sep
(19) |
Oct
|
Nov
(2) |
Dec
|
| 2009 |
Jan
(36) |
Feb
(4) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
(15) |
Jul
(30) |
Aug
(32) |
Sep
(11) |
Oct
(21) |
Nov
(12) |
Dec
(15) |
| 2010 |
Jan
(29) |
Feb
(9) |
Mar
(25) |
Apr
|
May
(7) |
Jun
(5) |
Jul
(21) |
Aug
(32) |
Sep
(10) |
Oct
(8) |
Nov
(29) |
Dec
(8) |
| 2011 |
Jan
(9) |
Feb
(35) |
Mar
(11) |
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(30) |
| 2012 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <mwl...@us...> - 2007-08-30 20:39:40
|
Revision: 504
http://cishell.svn.sourceforge.net/cishell/?rev=504&view=rev
Author: mwlinnem
Date: 2007-08-30 13:39:35 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Added report that simply outputs the unmodified converter graph.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
Removed Paths:
-------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterNode.java
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-30 20:38:58 UTC (rev 503)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-30 20:39:35 UTC (rev 504)
@@ -11,11 +11,11 @@
import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
import org.cishell.framework.data.DataProperty;
-import org.cishell.testing.convertertester.core.converter.graph.ConverterGraph;
import org.cishell.testing.convertertester.core.tester2.ConverterTester2;
import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.allconvs.AllConvsReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.alltests.AllTestsReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.convgraph.AnnotatedGraphReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.convgraph.GraphReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.readme.ReadMeReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.AllConvsReport;
@@ -35,7 +35,8 @@
//TODO: Maybe let the user specify which converters he/she wants to test, or other things
//TODO: Make it progress-trackable
-public class ConverterTesterAlgorithm implements Algorithm, AlgorithmProperty {
+public class ConverterTesterAlgorithm implements Algorithm,
+ AlgorithmProperty {
private CIShellContext cContext;
private BundleContext bContext;
@@ -62,7 +63,8 @@
Data[] returnDM;
- final IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
+ final IWorkbenchWindow[] windows =
+ PlatformUI.getWorkbench().getWorkbenchWindows();
if (windows.length == 0) {
return null;
}
@@ -111,16 +113,26 @@
//initialize all the report generators
- AllTestsReportGenerator allGen = new AllTestsReportGenerator(this.log);
- AllConvsReportGenerator allConvGen = new AllConvsReportGenerator(this.log);
- GraphReportGenerator graphGen = new GraphReportGenerator(this.log);
- ReadMeReportGenerator readmeGen = new ReadMeReportGenerator();
+ AllTestsReportGenerator allGen =
+ new AllTestsReportGenerator(this.log);
+ AllConvsReportGenerator allConvGen =
+ new AllConvsReportGenerator(this.log);
+ GraphReportGenerator origGraphGen =
+ new GraphReportGenerator(this.log);
+ AnnotatedGraphReportGenerator graphGen =
+ new AnnotatedGraphReportGenerator(this.log);
+ ReadMeReportGenerator readmeGen =
+ new ReadMeReportGenerator(this.log);
- //execute the tests, and provide the results to the report generators
+ /*
+ * execute the tests, and provide the results to the
+ * report generators
+ */
ConverterTester2 ct = new ConverterTester2(log);
ct.execute(convRefs,
new ReportGenerator[]
- {allGen, allConvGen, graphGen, readmeGen},
+ {allGen, allConvGen, graphGen, origGraphGen,
+ readmeGen},
cContext, bContext);
/*
* report generators have now been supplied with the test
@@ -143,29 +155,38 @@
allReport.getName() , null);
addReturn(allReportData);
- TestReport[] sTestReports = allReport.getSuccessfulTestReports();
+ TestReport[] sTestReports =
+ allReport.getSuccessfulTestReports();
addFilePasses(sTestReports, allReportData);
- TestReport[] ppTestReports = allReport.getPartialSuccessTestReports();
+ TestReport[] ppTestReports =
+ allReport.getPartialSuccessTestReports();
addFilePasses(ppTestReports, allReportData);
- TestReport[] fTestReports = allReport.getFailedTestReports();
+ TestReport[] fTestReports =
+ allReport.getFailedTestReports();
addFilePasses(fTestReports, allReportData);
//return all converters report
- AllConvsReport allConvReport = allConvGen.getAllConvsReport();
+ AllConvsReport allConvReport =
+ allConvGen.getAllConvsReport();
File allConvReportFile = allConvReport.getReport();
- Data allConvReportData = createReportData(allConvReportFile, allConvReport.getName(),
+ Data allConvReportData =
+ createReportData(allConvReportFile,
+ allConvReport.getName(),
null);
addReturn(allConvReportData);
//return each converter report
- ConvReport[] convReports = allConvReport.getConverterReports();
+ ConvReport[] convReports =
+ allConvReport.getConverterReports();
for (int ii = 0; ii < convReports.length; ii++) {
ConvReport convReport = convReports[ii];
File convReportFile = convReport.getReport();
- Data convReportData = createReportData(convReportFile, convReport.getName(), allConvReportData);
+ Data convReportData =
+ createReportData(convReportFile,
+ convReport.getName(), allConvReportData);
addReturn(convReportData);
TestReport[] trs = convReport.getTestReports();
@@ -175,11 +196,23 @@
//return annotated graph report
File graphReportFile = graphGen.getGraphReport();
- Data graphReport = createReportData(graphReportFile, "Annotated Graph Report", null,
+ Data graphReport = createReportData(graphReportFile,
+ "Annotated Converter Graph", null,
"file:text/nwb", DataProperty.NETWORK_TYPE);
addReturn(graphReport);
+
+ //return original graph report
+
+ File origGraphReportFile = origGraphGen.getGraphReport();
+ Data origGraphReport = createReportData(
+ origGraphReportFile,
+ "Original Converter Graph", null,
+ "file:text/nwb", DataProperty.NETWORK_TYPE);
+ addReturn(origGraphReport);
+
} catch (Exception e) {
- this.log.log(LogService.LOG_ERROR, "Converter Tester Failed.", e);
+ this.log.log(LogService.LOG_ERROR, "Converter Tester Failed.",
+ e);
e.printStackTrace();
}
}
@@ -195,20 +228,20 @@
/**
* Returns file pass reports associated with tests or converters.
- * @param testReports reports to be returned as children or test or converter
+ * @param testReports reports to be returned as children or test or
+ * converter
* @param parent the parent of the file pass
*/
private void addFilePasses(TestReport[] testReports, Data parent) {
for (int ii = 0; ii < testReports.length; ii++) {
TestReport tr = testReports[ii];
File testReportFile = tr.getTestReport();
-// System.out.println("In algorithm, file pass name is : " + tr.getName());
-// System.out.println("In algorithm FILE name is : " + testReportFile.getName());
Data testReportData = createReportData(testReportFile,
tr.getName(), parent);
addReturn(testReportData);
- FilePassReport[] sFilePassReports = tr.getSuccessfulFilePassReports();
+ FilePassReport[] sFilePassReports =
+ tr.getSuccessfulFilePassReports();
for (int kk = 0; kk < sFilePassReports.length; kk++) {
FilePassReport fp = sFilePassReports[kk];
File fpFile = fp.getFilePassReport();
@@ -217,7 +250,8 @@
addReturn(fpData);
}
- FilePassReport[] fFilePassReports = tr.getFailedFilePassReports();
+ FilePassReport[] fFilePassReports =
+ tr.getFailedFilePassReports();
for (int kk = 0; kk < fFilePassReports.length; kk++) {
FilePassReport fp = fFilePassReports[kk];
File fpFile = fp.getFilePassReport();
@@ -233,14 +267,16 @@
* returned from the algorithm.
*
* @param report the report to be turned into data
- * @param label how the report will be labeled in the data manager window
+ * @param label how the report will be labeled in the data manager
+ * window
* @param parent which report this report will hang from
* (null if it is not a child of any report)
* @param format The file format or class name of the report
* @param type whether the report is a network or text file
* @return the report encapsulated in data, ready to be returned.
*/
- private Data createReportData(Object report, String label, Data parent, String format, String type) {
+ private Data createReportData(Object report, String label,
+ Data parent, String format, String type) {
Data reportData = new BasicData(report, format);
Dictionary metadata = reportData.getMetaData();
metadata.put(DataProperty.LABEL, label);
@@ -252,22 +288,26 @@
}
/**
- * Alternate version of createReportData that assumes the report is a plain text file
+ * Alternate version of createReportData that assumes the report
+ * is a plain text file
* @param report the report to be turned into data
- * @param label how the report will be labeled in the data manager window
+ * @param label how the report will be labeled in the data manager
+ * window
* @param parent which report this report will hang from
* (null if it is not a child of any report)
* @return the report encapsulated in data, ready to be returned.
*/
- private Data createReportData(Object report, String label, Data parent) {
- return createReportData(report, label, parent, "file:text/plain", DataProperty.TEXT_TYPE);
+ private Data createReportData(Object report, String label,
+ Data parent) {
+ return createReportData(report, label, parent, "file:text/plain",
+ DataProperty.TEXT_TYPE);
}
}
private ServiceReference[] getConverterReferences() {
- String filter = "(&("+ALGORITHM_TYPE+"="+TYPE_CONVERTER+"))";// +
+ String filter = "(&("+ALGORITHM_TYPE+"="+TYPE_CONVERTER+"))";
try {
ServiceReference[] refs = bContext.getServiceReferences(
Deleted: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterNode.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterNode.java 2007-08-30 20:38:58 UTC (rev 503)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterNode.java 2007-08-30 20:39:35 UTC (rev 504)
@@ -1,32 +0,0 @@
-package org.cishell.testing.convertertester.core.converter.graph;
-
-public class ConverterNode {
- String name;
- int id;
-
- public ConverterNode(String s, int i){
- name = s;
- id = i;
- }
-
- public String getName(){
- return name;
- }
-
- public int getID(){
- return id;
- }
-
- public void setName(String s){
- name = s;
- }
-
- public void setID(int i){
- id = i;
- }
-
- public String toString(){
- return name + " " + id;
- }
-
-}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-30 20:38:58 UTC (rev 503)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-30 20:39:35 UTC (rev 504)
@@ -79,9 +79,6 @@
TestResult[] rawResults =
runAllTests(converterGraph, cContext, bContext);
- System.out.println("Num Test Results coming out of runAllTests" +
- ": " + rawResults.length);
-
AllTestsResult allTestsResult = new AllTestsResult(rawResults);
//analyze the test results to extract more useful info
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-30 20:38:58 UTC (rev 503)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-30 20:39:35 UTC (rev 504)
@@ -5,14 +5,18 @@
import org.cishell.testing.convertertester.core.tester2.TestFileKeeper;
import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.ReadMeReport;
-import org.cishell.testing.convertertester.core.tester2.reportgen.reports.Report;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllConvsResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
+import org.osgi.service.log.LogService;
public class ReadMeReportGenerator implements ReportGenerator {
+ private LogService log;
private ReadMeReport readme;
+ public ReadMeReportGenerator(LogService log) {
+ this.log = log;
+ }
/**
* Instead of actually generating the report in-line, we just
* load a file with the report text inside it, and return it as is.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 503
http://cishell.svn.sourceforge.net/cishell/?rev=503&view=rev
Author: mwlinnem
Date: 2007-08-30 13:38:58 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Cleaned up and commented some methods while hunting for missing edge bug in Converter Graph.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-30 19:24:13 UTC (rev 502)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-30 20:38:58 UTC (rev 503)
@@ -17,7 +17,7 @@
public class ConverterGraph {
prefuse.data.Graph converterGraph;
- Map inDataToAlgorithm;
+ Map inDataToConverters;
Map fileExtensionTestConverters;
Map fileExtensionCompareConverters;
Converter[] converters;
@@ -25,18 +25,22 @@
private LogService log;
private static final String testOutData = "prefuse.data.Graph";
- public ConverterGraph(ServiceReference[] converterRefs, BundleContext bContext, LogService log) {
+ public ConverterGraph(ServiceReference[] converterRefs,
+ BundleContext bContext, LogService log) {
this.bContext = bContext;
this.log = log;
this.converters = createConverters(converterRefs);
- inDataToAlgorithm = new HashMap();//<String, List<Convertere>>();
- fileExtensionTestConverters = new ConcurrentHashMap();//<String, List<ConverterPath>>();
- fileExtensionCompareConverters = new ConcurrentHashMap();//<String, ConverterPath>();
+ inDataToConverters =
+ new HashMap();//<String, List<Convertere>>();
+ fileExtensionTestConverters =
+ new ConcurrentHashMap();//<String, List<ConverterPath>>();
+ fileExtensionCompareConverters =
+ new ConcurrentHashMap();//<String, ConverterPath>();
- associateAlgorithms(this.converters, this.inDataToAlgorithm);
- createConverterPaths(this.inDataToAlgorithm, this.fileExtensionTestConverters, this.fileExtensionCompareConverters);
+ associateConverters(this.converters, this.inDataToConverters);
+ createConverterPaths(this.inDataToConverters, this.fileExtensionTestConverters, this.fileExtensionCompareConverters);
}
@@ -50,10 +54,12 @@
return (Converter[]) converters.toArray(new Converter[0]);
}
- private void associateAlgorithms(Converter[] cs, Map hm){
+ private void associateConverters(Converter[] cs, Map hm){
for (int i = 0; i < cs.length; i++){
Converter c = cs[i];
+
String s = c.getInData();
+
if(hm.get(s) == null){
List l = new ArrayList();
l.add(c);
@@ -98,7 +104,7 @@
ConverterPath p = new ConverterPath(path, this.bContext);
p.add((Converter) cs.get(0));
cs.remove(0);
- createPaths((List)this.inDataToAlgorithm.get(p.getOutData()), p, p.getOutData());
+ createPaths((List)this.inDataToConverters.get(p.getOutData()), p, p.getOutData());
}
return null;
@@ -214,12 +220,12 @@
public String toString(){
StringBuffer str = new StringBuffer();
- String[] keySet = new String[this.inDataToAlgorithm.keySet().size()];
- keySet = (String[])this.inDataToAlgorithm.keySet().toArray(keySet);
+ String[] keySet = new String[this.inDataToConverters.keySet().size()];
+ keySet = (String[])this.inDataToConverters.keySet().toArray(keySet);
for(int i = 0; i < keySet.length; i++){
String s = keySet[i];
str.append(s + "\r\n");
- List al = (List)this.inDataToAlgorithm.get(s);
+ List al = (List)this.inDataToConverters.get(s);
for(int j = 0; j < al.size(); j++){
Converter c = (Converter)al.get(j);
str.append("\t" + c.getUniqueName() + "\r\n");
@@ -274,19 +280,25 @@
}
public File asNWB() {
- File f = getTempFile();
+
Map nodes = assembleNodesSet();
- TreeSet output = assembleEdges(nodes);
- try{
- FileWriter out = new FileWriter(f);
- BufferedWriter bw = new BufferedWriter(out);
+ TreeSet edges = assembleEdges(nodes);
- writeNodes(bw,nodes);
- writeEdges(bw,output);
- }
- catch(IOException ex){
+ File f = getTempFile();
+ try {
+ BufferedWriter writer =
+ new BufferedWriter(new FileWriter(f));
+
+ writeNodes(writer,nodes);
+ writeEdges(writer,edges);
+
+ } catch(IOException e) {
System.out.println("Blurt!");
+ this.log.log(LogService.LOG_ERROR,
+ "IOException while creating converter graph file",
+ e);
}
+
return f;
}
@@ -298,13 +310,16 @@
private void writeNodes(BufferedWriter bw, Map nodes) throws IOException{
writeNodeHeader(bw, nodes.size());
+
String[] keySet = new String[nodes.keySet().size()];
+
keySet = (String[])nodes.keySet().toArray(keySet);
for(int i = 0; i < keySet.length; i++){
- bw.flush();
bw.write(nodes.get(keySet[i]) + " \"" + keySet[i]+"\"\r\n");
}
+ bw.flush();
+
}
private void writeEdgeHeader(BufferedWriter bw, int numEdges) throws IOException{
@@ -320,9 +335,10 @@
edgeArray = (String[])edges.toArray(edgeArray);
for(int i = 0; i < edgeArray.length; i++){
- bw.flush();
bw.write(edgeArray[i]+"\r\n");
}
+
+ bw.flush();
}
private Map assembleNodesSet(){
@@ -330,54 +346,89 @@
Map nodesToInt = new ConcurrentHashMap();
//create a set of all the in_data, out_data, and algorithm names
- String[] keySet = new String[this.inDataToAlgorithm.keySet().size()];
- keySet = (String[])this.inDataToAlgorithm.keySet().toArray(keySet);
- TreeSet nodeNames = new TreeSet();
- for(int i = 0; i < keySet.length; i++){
- String s = keySet[i];
- nodeNames.add(s);
- List paths = (List)this.inDataToAlgorithm.get(s);
- Converter[] convs = new Converter[paths.size()];
- convs = (Converter[])paths.toArray(convs);
+
+ String[] inDatas = new String[this.inDataToConverters.keySet().size()];
+ inDatas = (String[])this.inDataToConverters.keySet().toArray(inDatas);
+
+ TreeSet nodeNameList = new TreeSet();
+
+ //for each unique in_data...
+ for(int i = 0; i < inDatas.length; i++){
+ String inData = inDatas[i];
+ //add the in_data string to our list of node names
+ nodeNameList.add(inData);
+
+ List convsList = (List)this.inDataToConverters.get(inData);
+ Converter[] convs = new Converter[convsList.size()];
+ convs = (Converter[])convsList.toArray(convs);
+
+ //for each converter associated with each in_data...
for(int j = 0; j < convs.length; j++){
Converter c = convs[j];
- nodeNames.add(c.getUniqueName());
+ //add the name of the converter to our list of node names
+ nodeNameList.add(c.getShortName());
}
}
- String[] names = new String[nodeNames.size()];
- names = (String[])nodeNames.toArray(names);
+ String[] names = new String[nodeNameList.size()];
+ names = (String[])nodeNameList.toArray(names);
+ //for each node name in our list of node names ...
for(int i = 0; i < names.length; i++){
+ //associate that name with a unique integer in our map
nodesToInt.put(names[i], new Integer(i+1));
}
+ //return our map of nodes to unique integers
return nodesToInt;
}
- private TreeSet assembleEdges(Map m){
+ private TreeSet assembleEdges(Map nodeNameToInt){
TreeSet edges = new TreeSet();
- String[] keySet = new String[m.size()];
- keySet = (String[])m.keySet().toArray(keySet);
- for(int i = 0; i < keySet.length; i++){
- String s = keySet[i];
- List paths = (List)this.inDataToAlgorithm.get(s);
- if(paths != null){
- Converter[] convs = new Converter[paths.size()];
- convs = (Converter[])paths.toArray(convs);
+
+
+ String[] nodeNames = new String[nodeNameToInt.size()];
+ nodeNames = (String[])nodeNameToInt.keySet().toArray(nodeNames);
+ //for each node name in our list of node names...
+ for(int i = 0; i < nodeNames.length; i++){
+ String nodeName = nodeNames[i];
- for(int j = 0; j < convs.length; j++){
- String output1 = m.get(s).toString() + " ";
- String output2 = convs[j].getUniqueName();
- output1 += m.get(output2).toString();
- output2 = m.get(output2).toString() + " " + m.get(convs[j].getOutData());
- edges.add(output1);
- edges.add(output2);
+ /*
+ * check to see if that node name is associated with a list of
+ * converters.
+ *
+ * (Node names are either the names of in_data formats or the
+ * names of converters)
+ */
+ List converterList = (List)this.inDataToConverters.get(nodeName);
+
+ //if our node name is associated with a list of converters...
+ if(converterList != null) {
+ //(then our node name must be the name of an in_data format)
+ Converter[] convs = new Converter[converterList.size()];
+ convs = (Converter[])converterList.toArray(convs);
+
+ //for each converter...
+ for(int j = 0; j < convs.length; j++){
+ String convName = convs[j].getShortName();
+
+ String nodeNumber = nodeNameToInt.get(nodeName).toString();
+ String convNumber = nodeNameToInt.get(convName).toString();
+
+ //add an edge from our original node to this converter
+ String edge1 = nodeNumber + " " + convNumber;
+ edges.add(edge1);
+ //and add an edge from this converter to our original node
+ String edge2 = convNumber + " " + nodeNumber;
+ edges.add(edge2);
+
+ }
}
- }
}
+
+ //return our set of edges
return edges;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 502
http://cishell.svn.sourceforge.net/cishell/?rev=502&view=rev
Author: mwlinnem
Date: 2007-08-30 12:24:13 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Changed name of graph report generator in preparation for non-annotated graph report generator
Added Paths:
-----------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/AnnotatedGraphReportGenerator.java
Removed Paths:
-------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java
Copied: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/AnnotatedGraphReportGenerator.java (from rev 497, trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java)
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/AnnotatedGraphReportGenerator.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/AnnotatedGraphReportGenerator.java 2007-08-30 19:24:13 UTC (rev 502)
@@ -0,0 +1,111 @@
+package org.cishell.testing.convertertester.core.tester2.reportgen.convgraph;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.cishell.testing.convertertester.core.tester2.reportgen.ConvResultMaker;
+import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllConvsResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvResult;
+import org.osgi.service.log.LogService;
+
+public class AnnotatedGraphReportGenerator implements ReportGenerator {
+
+ private ConvResultMaker convGen = new ConvResultMaker();
+ private LogService log;
+
+ private File annotatedNWBGraph = new File(TEMP_DIR + "annotated-converter-graph.nwb");
+
+ private String NODE_LINE = "^\\d+? \".*?\"$";
+
+ public AnnotatedGraphReportGenerator(LogService log) {
+ this.log = log;
+ }
+
+ public void generateReport(AllTestsResult atr,
+ AllConvsResult acr,
+ File nwbConvGraph) {
+ ConvResult[] convs = acr.getConvResults();
+
+ BufferedReader reader = null;
+ BufferedWriter writer = null;
+ try {
+ reader = new BufferedReader( new FileReader(nwbConvGraph));
+ writer = new BufferedWriter( new FileWriter(this.annotatedNWBGraph));
+
+ String line = null;
+ while ((line = reader.readLine()) != null) {
+ line = line.trim();
+
+ if (line.startsWith("id*int")) {
+ writer.write(line + " isTrusted*int chanceCorrect*float isConverter*int \r\n");
+ } else if (line.matches(NODE_LINE)) {
+ String[] parts = line.split(" ");
+ String rawConvName = parts[1];
+ String convName = rawConvName.replaceAll("\"", "");
+
+ boolean wroteAttributes = false;
+ for (int ii = 0; ii < convs.length ; ii++) {
+ ConvResult cr = convs[ii];
+ if (cr.getUniqueName().equals(convName)) {
+ int trusted;
+
+ if (cr.isTrusted()) {
+ trusted = 1;
+ } else {
+ trusted = 0;
+ }
+
+ writer.write(line + " " + trusted + " " +
+ cr.getChanceCorrect() + " 1 " + "\r\n");
+ wroteAttributes = true;
+ break;
+ }
+ }
+
+ if (! wroteAttributes) {
+ writer.write(line + " 1 1.0 0" + "\r\n");
+ }
+
+ } else {
+ writer.write(line + "\r\n");
+ }
+ }
+
+ } catch (IOException e) {
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to generate Graph Report.", e);
+ try {
+ if (reader != null) reader.close();
+ } catch (IOException e2) {
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to close graph report stream", e);
+ }
+ } finally {
+ try {
+ if (reader != null) {
+ reader.close();
+ }
+
+ if (writer != null) {
+ writer.close();
+ }
+ } catch (IOException e) {
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to close either graph report reader or " +
+ "writer.", e);
+ e.printStackTrace();
+ }
+ }
+ }
+
+
+ public File getGraphReport() {
+ return this.annotatedNWBGraph;
+ }
+}
Deleted: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java 2007-08-30 19:22:38 UTC (rev 501)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java 2007-08-30 19:24:13 UTC (rev 502)
@@ -1,111 +0,0 @@
-package org.cishell.testing.convertertester.core.tester2.reportgen.convgraph;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-
-import org.cishell.testing.convertertester.core.tester2.reportgen.ConvResultMaker;
-import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllConvsResult;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvResult;
-import org.osgi.service.log.LogService;
-
-public class GraphReportGenerator implements ReportGenerator {
-
- private ConvResultMaker convGen = new ConvResultMaker();
- private LogService log;
-
- private File annotatedNWBGraph = new File(TEMP_DIR + "annotated-converter-graph.nwb");
-
- private String NODE_LINE = "^\\d+? \".*?\"$";
-
- public GraphReportGenerator(LogService log) {
- this.log = log;
- }
-
- public void generateReport(AllTestsResult atr,
- AllConvsResult acr,
- File nwbConvGraph) {
- ConvResult[] convs = acr.getConvResults();
-
- BufferedReader reader = null;
- BufferedWriter writer = null;
- try {
- reader = new BufferedReader( new FileReader(nwbConvGraph));
- writer = new BufferedWriter( new FileWriter(this.annotatedNWBGraph));
-
- String line = null;
- while ((line = reader.readLine()) != null) {
- line = line.trim();
-
- if (line.startsWith("id*int")) {
- writer.write(line + " isTrusted*int chanceCorrect*float isConverter*int \r\n");
- } else if (line.matches(NODE_LINE)) {
- String[] parts = line.split(" ");
- String rawConvName = parts[1];
- String convName = rawConvName.replaceAll("\"", "");
-
- boolean wroteAttributes = false;
- for (int ii = 0; ii < convs.length ; ii++) {
- ConvResult cr = convs[ii];
- if (cr.getUniqueName().equals(convName)) {
- int trusted;
-
- if (cr.isTrusted()) {
- trusted = 1;
- } else {
- trusted = 0;
- }
-
- writer.write(line + " " + trusted + " " +
- cr.getChanceCorrect() + " 1 " + "\r\n");
- wroteAttributes = true;
- break;
- }
- }
-
- if (! wroteAttributes) {
- writer.write(line + " 1 1.0 0" + "\r\n");
- }
-
- } else {
- writer.write(line + "\r\n");
- }
- }
-
- } catch (IOException e) {
- this.log.log(LogService.LOG_ERROR,
- "Unable to generate Graph Report.", e);
- try {
- if (reader != null) reader.close();
- } catch (IOException e2) {
- this.log.log(LogService.LOG_ERROR,
- "Unable to close graph report stream", e);
- }
- } finally {
- try {
- if (reader != null) {
- reader.close();
- }
-
- if (writer != null) {
- writer.close();
- }
- } catch (IOException e) {
- this.log.log(LogService.LOG_ERROR,
- "Unable to close either graph report reader or " +
- "writer.", e);
- e.printStackTrace();
- }
- }
- }
-
-
- public File getGraphReport() {
- return this.annotatedNWBGraph;
- }
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 501
http://cishell.svn.sourceforge.net/cishell/?rev=501&view=rev
Author: mwlinnem
Date: 2007-08-30 12:22:38 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Removed passed % from converter report (Can be confusing when converter is marked as trusted).
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-30 19:19:13 UTC (rev 500)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-30 19:22:38 UTC (rev 501)
@@ -55,8 +55,8 @@
report.println("# of files passed through :"
+ convResult.getNumFilePasses());
report.println("");
- report.println("% Passed : "
- + convResult.getPercentPassed());
+// report.println("% Passed : "
+// + convResult.getPercentPassed());
report.println("% Chance of Flaw : "
+ convResult.getChanceOfFlaw());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 500
http://cishell.svn.sourceforge.net/cishell/?rev=500&view=rev
Author: mwlinnem
Date: 2007-08-30 12:19:13 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Test Reports now say which # test they are in their text.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-30 19:09:19 UTC (rev 499)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-30 19:19:13 UTC (rev 500)
@@ -37,7 +37,7 @@
reportOutStream = new FileOutputStream(reportFile);
PrintStream report = new PrintStream(reportOutStream);
- report.println("Test Result Report");
+ report.println("Test " + tr.getTestNum() + " Result Report");
report.println("-----------------------------------------------");
report.println("");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 499
http://cishell.svn.sourceforge.net/cishell/?rev=499&view=rev
Author: mwlinnem
Date: 2007-08-30 12:09:19 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Major refactoring. Many little changes.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-30 19:08:56 UTC (rev 498)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-30 19:09:19 UTC (rev 499)
@@ -52,13 +52,13 @@
}
public Data[] execute() {
-
this.log.log(LogService.LOG_INFO,
- "-------NOTICE-------" + "\n" +
+ "\r\n" +
+ "-------NOTICE-------" + "\r\n" +
"The Converter Tester will take " +
- "approximately 30 seconds to run all the tests. \n" +
- "Thank you for waiting :)" + "\n" +
- "-----END NOTICE-----");
+ "approximately 30 seconds to run all the tests. \r\n" +
+ "Thank you for waiting :)" + "\r\n" +
+ "-----END NOTICE----- \r\n");
Data[] returnDM;
@@ -107,22 +107,18 @@
//get all the converters
ServiceReference[] convRefs = getConverterReferences();
- //generate converter paths inside converter graph, for use in executing the test
- ConverterGraph converterGraph = new ConverterGraph(convRefs, bContext, log);
+
- //extract converter graph in nwb file format.
- File nwbGraph = converterGraph.asNWB();
-
//initialize all the report generators
AllTestsReportGenerator allGen = new AllTestsReportGenerator(this.log);
AllConvsReportGenerator allConvGen = new AllConvsReportGenerator(this.log);
- GraphReportGenerator graphGen = new GraphReportGenerator(nwbGraph, this.log);
+ GraphReportGenerator graphGen = new GraphReportGenerator(this.log);
ReadMeReportGenerator readmeGen = new ReadMeReportGenerator();
//execute the tests, and provide the results to the report generators
ConverterTester2 ct = new ConverterTester2(log);
- ct.execute(converterGraph,
+ ct.execute(convRefs,
new ReportGenerator[]
{allGen, allConvGen, graphGen, readmeGen},
cContext, bContext);
@@ -184,6 +180,7 @@
addReturn(graphReport);
} catch (Exception e) {
this.log.log(LogService.LOG_ERROR, "Converter Tester Failed.", e);
+ e.printStackTrace();
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-30 19:09:03
|
Revision: 498
http://cishell.svn.sourceforge.net/cishell/?rev=498&view=rev
Author: mwlinnem
Date: 2007-08-30 12:08:56 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Major refactoring. Many little changes.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
Added Paths:
-----------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java 2007-08-30 19:08:56 UTC (rev 498)
@@ -0,0 +1,335 @@
+package org.cishell.testing.convertertester.core.tester2.reportgen;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.cishell.testing.convertertester.core.converter.graph.Converter;
+import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
+import org.cishell.testing.convertertester.core.tester2.reportgen.faultanalysis.ChanceAtFault;
+import org.cishell.testing.convertertester.core.tester2.reportgen.faultanalysis.ChanceAtFaultHeuristic;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllConvsResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.TestResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.FilePassSuccess;
+
+public class ConvResultMaker {
+
+ public static AllConvsResult generate(AllTestsResult atr,
+ Converter[] allConvs, ChanceAtFaultHeuristic faultHeuristic) {
+
+ Converter[] trustedConvs = determineWhichAreTrusted(atr);
+
+ System.out.println("*** # Trusted Convs: " + trustedConvs.length);
+
+ Map convToTestsToPasses = associateConvsWithTestsAndPasses(atr,
+ allConvs, trustedConvs,
+ faultHeuristic);
+ ConvResult[] convResults = generateConvResults(convToTestsToPasses,
+ allConvs, trustedConvs);
+
+// addFaultInfo(convResults, trustedConvs, faultHeuristic);
+
+ return new AllConvsResult(convResults);
+
+ }
+
+ /**
+ * Looks for tests where each file pass succeeded. We will assume that
+ * each converter involved in a test where all file passes succeeded is
+ * very likely to be correct. If one of these converters is involved
+ * in a file pass that fails at some later point, we will assume
+ * that that converter was not at fault, but was fed erroneous data
+ * by previous converters.
+ * @param atr the test results, which contain info on failure
+ * or success of each test.
+ * @return an array of the converters that are trusted
+ */
+ private static Converter[] determineWhichAreTrusted(AllTestsResult atr) {
+ TestResult[] trs = atr.getTestResults();
+
+ List trustedConverters = new ArrayList();
+ for (int ii = 0; ii < trs.length; ii++) {
+ TestResult tr = trs[ii];
+ FilePassResult[] fprs = tr.getFilePassResults();
+
+ //check if all file passes were successes
+
+ boolean trusted = true;
+ for (int jj = 0; jj < fprs.length; jj++) {
+ FilePassResult fpr = fprs[jj];
+ if (! fpr.succeeded()) {
+ //not all were successes
+ trusted = false;
+ break;
+ }
+ }
+
+ if (trusted && fprs.length > 0) {
+ //mark all converters involved as trusted.
+
+ ConverterPath testConvs = tr.getTestConverters();
+ for (int kk = 0; kk < testConvs.size(); kk++) {
+ Converter conv = testConvs.get(kk);
+ trustedConverters.add(conv);
+ }
+ }
+ }
+
+ return (Converter[]) trustedConverters.toArray(new Converter[0]);
+ }
+
+
+ private static Map associateConvsWithTestsAndPasses(AllTestsResult atr,
+ Converter[] allConvs, Converter[] trustedConvs,
+ ChanceAtFaultHeuristic faultHeuristic) {
+ TestResult[] trs = atr.getTestResults();
+
+ //Map<Converter, Map<TestResult, List<FilePassResult>>>
+ Map convToTestsToPasses = new HashMap();
+ initialize(convToTestsToPasses, allConvs);
+
+ //for each test...
+ for (int ii = 0; ii < trs.length; ii++) {
+ TestResult tr = trs[ii];
+
+ FilePassResult[] fps = tr.getFilePassResults();
+ //for each file pass...
+ for (int jj = 0; jj < fps.length; jj++) {
+ FilePassResult fp = fps[jj];
+
+ Converter[] convsInvolved = fp.getConvertersInvolved();
+
+ /*
+ * associate the file pass with the chance that each converter
+ * involved is at fault.
+ */
+
+ if (! fp.succeeded()) {
+ ChanceAtFault[] chanceAtFaults = faultHeuristic.determine(fp,
+ convsInvolved, trustedConvs);
+ for (int kk = 0; kk < chanceAtFaults.length; kk++) {
+ ChanceAtFault caf = chanceAtFaults[kk];
+ fp.addChanceAtFault(caf);
+ }
+ }
+
+ //for each converter involved...
+ for (int kk = 0; kk < convsInvolved.length; kk++) {
+ Converter conv = convsInvolved[kk];
+
+ /*
+ * associate the converter with the tests and
+ * file passes that involve it.
+ *
+ * (side-effects convToTestsToPasses)
+ */
+ addPassResult(convToTestsToPasses, conv,
+ fp);
+
+ }
+ }
+ }
+
+ return convToTestsToPasses;
+ }
+
+ private static ConvResult[] generateConvResults(Map convToTestsToPasses,
+ Converter[] allConvs, Converter[] trustedConvs) {
+
+ ConvResult[] convResults = makeAndFillWithAssociatedTestsAndPasses(
+ convToTestsToPasses, allConvs, trustedConvs);
+
+// addFaultInfo(convResults, convToTestsToPasses, allConvs, trustedConvs,
+// faultHeuristic);
+
+ return convResults;
+ }
+
+ private static ConvResult[] makeAndFillWithAssociatedTestsAndPasses(
+ Map convToTestsToPasses, Converter[] allConvs,
+ Converter[] trustedConvs) {
+ List convResults = new ArrayList();
+
+ List trustedConvList = Arrays.asList(trustedConvs);
+ // for every converter we know of...
+ for (int ii = 0; ii < allConvs.length; ii++) {
+ Converter conv = allConvs[ii];
+ // get the associated test to passes map
+ Map testToPasses = (Map) convToTestsToPasses.get(conv);
+
+ /*
+ * create converter result objects which contain information about
+ * which tests and file passes it is involved with, and whether it
+ * is trusted.
+ */
+
+ boolean isTrusted = trustedConvList.contains(conv);
+
+ ConvResult convResult = new ConvResult(conv, isTrusted,
+ testToPasses);
+
+ convResults.add(convResult);
+ }
+ // return the converter result objects
+ return (ConvResult[]) convResults.toArray(new ConvResult[0]);
+ }
+
+ private static void addPassResult(Map convToTestsToPasses, Converter conv,
+ FilePassResult pass) {
+
+ TestResult test = pass.getParent();
+
+ Map testToPasses = (Map) convToTestsToPasses.get(conv);
+ List passes;
+
+ //if we already associated this test with the converter...
+ if (testToPasses != null) {
+ passes = (List) testToPasses.get(test);
+ if (passes == null) {
+ passes = new ArrayList();
+ }
+ } else { //otherwise...
+ testToPasses = new HashMap();
+ passes = new ArrayList();
+ }
+
+ passes.add(pass);
+ testToPasses.put(test, passes);
+ convToTestsToPasses.put(conv, testToPasses);
+ }
+
+ /**
+ * Ensures that each converter is represented in the map, whether or not
+ * there are any test associated with it.
+ * @param convToTestsToPasses The map we side-effect
+ * @param allConvs an array of all the converters we know of
+ */
+ private static void initialize(Map convToTestsToPasses, Converter[] allConvs) {
+ for (int ii = 0; ii < allConvs.length; ii++) {
+ Converter conv = allConvs[ii];
+
+ convToTestsToPasses.put(conv, new HashMap());
+ }
+ }
+
+// private static addFaultInfo(AllTestsResult atr, ConvResult[] crs,
+// Converter[] trustedConvs, ChanceAtFaultHeuristic faultHeuristic) {
+//
+// Map convToChanceAtFaults = new HashMap();
+//
+// FilePassResult[] failFPRs = atr.getFailedFilePasses();
+// for (int ii = 0; ii < failFPRs.length; ii++) {
+// FilePassResult failFPR = failFPRs[ii];
+//
+// ChanceAtFault[] chanceAtFaultsForEachConv = getFaultInfo(failFPR,
+// trustedConvs, trustedConvs);
+//
+// for (int jj = 0; jj < chanceAtFaultsForEachConv.length; jj++) {
+// ChanceAtFault chanceAtFaultForAConv =
+// chanceAtFaultsForEachConv[jj];
+//
+// Converter conv = chanceAtFaultForAConv.getConverter();
+//
+// addEntryToList(convToChanceAtFaults, conv,
+// chanceAtFaultForAConv);
+//
+// }
+// }
+//
+// for (int ii = 0; ii < crs.length; ii++) {
+// ConvResult cr = crs[ii];
+//
+// Converter c = cr.getConverter();
+// List chanceAtFaults = convToChanceAtFaults.get(c);
+//
+// if (chanceAtFaults != null) {
+//
+// Iterator faultIter = chanceAtFaults.iterator();
+// while (faultIter.hasNext()) {
+// ChanceAtFault caf = (ChanceAtFault) faultIter.next();
+//
+// cr.
+// }
+// }
+// }
+//
+//
+//// List convResults = new ArrayList();
+////
+//// List trustedConvList = Arrays.asList(trustedConvs);
+//// //for every converter we know of...
+//// for (int ii = 0; ii < allConvs.length; ii++) {
+//// Converter conv = allConvs[ii];
+//// //get the associated test to passes map
+//// Map testToPasses = (Map) convToTestsToPasses.get(conv);
+////
+//// /*
+//// * create converter result objects which contain
+//// * information about which tests and file passes
+//// * it is involved with, and whether it is trusted.
+//// */
+////
+//// boolean isTrusted = trustedConvList.contains(conv);
+////
+//// ConvResult convResult = new ConvResult(conv, isTrusted,
+//// testToPasses);
+////
+//// convResults.add(convResult);
+////
+//// Set tests = testToPasses.keySet();
+//// Iterator testIter = tests.iterator();
+//// //for each test...
+//// while (testIter.hasNext()) {
+//// TestResult tr = (TestResult) testIter.next();
+//// List passes = (List) testToPasses.get(tr);
+//// Iterator passIter = passes.iterator();
+//// //for each involved pass...
+//// while (passIter.hasNext()) {
+//// FilePassResult fpr = (FilePassResult) passIter.next();
+////
+//// if (! fpr.succeeded()) {
+//// addFailInfo(fpr, trustedConvs, faultHeuristic);
+//// }
+//// }
+//// }
+//// }
+// }
+
+// private static ChanceAtFault[] getFaultInfo(FilePassResult failFP, Converter[] trustedConverters,
+// ChanceAtFaultHeuristic faultHeuristic) {
+// Converter[] convsInvolvedInFailure = failFP.getConvertersInvolved();
+// ChanceAtFault[] chanceAtFaults = faultHeuristic.determine(failFP,
+// convsInvolvedInFailure, trustedConverters);
+// return chanceAtFaults;
+// }
+
+ /**
+ * For maps that associate an object to a list of objects,
+ * add the given value to the list associated with the key.
+ *
+ * Side-effects the map
+ *
+ * @param map
+ * @param key
+ * @param value
+ */
+ private static void addEntryToList(Map map, Object key, Object value) {
+ List oldEntries = (List) map.get(key);
+
+ if (oldEntries == null) {
+ //no entries so far
+ oldEntries = new ArrayList();
+ }
+
+ oldEntries.add(value);
+
+ map.put(key, value);
+ }
+}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-30 19:07:57 UTC (rev 497)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-30 19:08:56 UTC (rev 498)
@@ -106,8 +106,6 @@
report.println("Consult the Annotated Graph Report for details on why this");
report.println("may not be testable.");
}
-
- List testReportsList = new ArrayList();
this.convReport = new ConvReport(reportFile, new TestReport[0], cr
.getShortNameWithTrust());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-30 19:08:12
|
Revision: 497
http://cishell.svn.sourceforge.net/cishell/?rev=497&view=rev
Author: mwlinnem
Date: 2007-08-30 12:07:57 -0700 (Thu, 30 Aug 2007)
Log Message:
-----------
Major refactoring. Many little changes.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/service/ConfigurationFileParser.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/ReportREADME.txt
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/ComparisonResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/RunningLog.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/ComplexGraphComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/AllTestsResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/FilePassResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/converter/ConvFailureInfo.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/FilePassSuccess.java
Added Paths:
-----------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/Converter.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/faultanalysis/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/faultanalysis/ChanceAtFault.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/faultanalysis/ChanceAtFaultHeuristic.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/faultanalysis/FullTrustHeuristic.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/AllConvsResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/AllErrorsResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ErrorResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/FilePassFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/PassPhase.java
Removed Paths:
-------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/ComparePhaseFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/ConvertPhaseFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/filepass/FilePassFailure.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/util/ConvUtil.java
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/Converter.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/Converter.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/Converter.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -0,0 +1,92 @@
+package org.cishell.testing.convertertester.core.converter.graph;
+
+import java.util.Hashtable;
+
+import org.cishell.framework.CIShellContext;
+import org.cishell.framework.algorithm.Algorithm;
+import org.cishell.framework.algorithm.AlgorithmFactory;
+import org.cishell.framework.algorithm.AlgorithmProperty;
+import org.cishell.framework.data.Data;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+public class Converter {
+
+ private BundleContext bContext;
+
+ private ServiceReference ref;
+
+ public Converter(BundleContext bContext, ServiceReference ref) {
+ this.bContext = bContext;
+ this.ref = ref;
+ }
+
+ public ServiceReference getServiceReference() {
+ return this.ref;
+ }
+
+ public ServiceReference getRef() {
+ return this.ref;
+ }
+
+ public boolean isLossy() {
+ String conversion = (String)
+ ref.getProperty(AlgorithmProperty.CONVERSION);
+
+ if (conversion == null) {
+ return false;
+ //if lossiness is not defined, assume it is not lossy.
+ }
+
+ if (conversion.equals(AlgorithmProperty.LOSSY)) {
+ return true;
+ } else if (conversion.equals(AlgorithmProperty.LOSSLESS)) {
+ return false;
+ } else {
+ //assuming lossy by default
+ return true;
+ }
+ }
+
+ public String getInData() {
+ return (String) ref.getProperty(AlgorithmProperty.IN_DATA);
+ }
+
+ public String getOutData() {
+ return (String) ref.getProperty(AlgorithmProperty.OUT_DATA);
+ }
+
+ public String getShortName() {
+ return removePackagePrefix(getUniqueName());
+ }
+
+ public String getUniqueName() {
+ return (String) this.ref.getProperty("service.pid");
+ }
+
+ public String toString() {
+ return getUniqueName();
+ }
+
+ public Data[] execute(Data[] input, Hashtable parameters,
+ CIShellContext cContext) {
+
+ AlgorithmFactory convAlgFactory =
+ (AlgorithmFactory) this.bContext.getService(this.ref);
+ Algorithm convAlg = convAlgFactory.createAlgorithm(input, parameters,
+ cContext);
+
+ Data[] output = convAlg.execute();
+
+ return output;
+ }
+
+
+ /*
+ * Returns everything after the last period in the OSGi service pid.
+ */
+ private String removePackagePrefix(String pid) {
+ int startIndex = pid.lastIndexOf(".") + 1;
+ return pid.substring(startIndex);
+ }
+}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -6,6 +6,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
@@ -19,35 +20,47 @@
Map inDataToAlgorithm;
Map fileExtensionTestConverters;
Map fileExtensionCompareConverters;
- ServiceReference[] converters;
+ Converter[] converters;
BundleContext bContext;
private LogService log;
private static final String testOutData = "prefuse.data.Graph";
- public ConverterGraph(ServiceReference[] converters, BundleContext bContext, LogService log){
- this.converters = converters;
+ public ConverterGraph(ServiceReference[] converterRefs, BundleContext bContext, LogService log) {
this.bContext = bContext;
this.log = log;
- inDataToAlgorithm = new HashMap();//<String, ArrayList<ServiceReference>>();
- fileExtensionTestConverters = new ConcurrentHashMap();//<String, ArrayList<ConverterPath>>();
+
+ this.converters = createConverters(converterRefs);
+
+ inDataToAlgorithm = new HashMap();//<String, List<Convertere>>();
+ fileExtensionTestConverters = new ConcurrentHashMap();//<String, List<ConverterPath>>();
fileExtensionCompareConverters = new ConcurrentHashMap();//<String, ConverterPath>();
associateAlgorithms(this.converters, this.inDataToAlgorithm);
createConverterPaths(this.inDataToAlgorithm, this.fileExtensionTestConverters, this.fileExtensionCompareConverters);
}
+
+ private Converter[] createConverters(ServiceReference[] convRefs) {
+ List converters = new ArrayList();
+
+ for (int ii = 0; ii < convRefs.length; ii++) {
+ converters.add(new Converter(this.bContext, convRefs[ii]));
+ }
+
+ return (Converter[]) converters.toArray(new Converter[0]);
+ }
- private void associateAlgorithms(ServiceReference[] sr, Map hm){
- for(int i = 0; i < sr.length; i++){
- ServiceReference srv = sr[i];
- String s = srv.getProperty("in_data").toString();
+ private void associateAlgorithms(Converter[] cs, Map hm){
+ for (int i = 0; i < cs.length; i++){
+ Converter c = cs[i];
+ String s = c.getInData();
if(hm.get(s) == null){
- ArrayList al = new ArrayList();
- al.add(srv);
- hm.put(s, al);
+ List l = new ArrayList();
+ l.add(c);
+ hm.put(s, l);
}
else{
- ((ArrayList)hm.get(s)).add(srv);
+ ((List)hm.get(s)).add(c);
}
}
}
@@ -65,15 +78,15 @@
test.setInData(s);
- createPaths((ArrayList)algorithms.get(s), test, s);
+ createPaths((List)algorithms.get(s), test, s);
}
}
}
- private ConverterPath createPaths(ArrayList algorithms, ConverterPath path, String dataType){
- ArrayList refs = removeReferences(algorithms, path);
+ private ConverterPath createPaths(List algorithms, ConverterPath path, String dataType){
+ List cs = removeReferences(algorithms, path);
addCompareCycle(path);
@@ -81,11 +94,11 @@
addTestCycle(path);
return path;
}
- while(!refs.isEmpty()){
+ while(!cs.isEmpty()){
ConverterPath p = new ConverterPath(path, this.bContext);
- p.addAlgorithm((ServiceReference)refs.get(0));
- refs.remove(0);
- createPaths((ArrayList)this.inDataToAlgorithm.get(p.getOutData()), p, p.getOutData());
+ p.add((Converter) cs.get(0));
+ cs.remove(0);
+ createPaths((List)this.inDataToAlgorithm.get(p.getOutData()), p, p.getOutData());
}
return null;
@@ -93,8 +106,8 @@
private void addTestCycle(ConverterPath cp){
String firstOutData, lastInData;
- firstOutData = ((ServiceReference)cp.getPath().get(0)).getProperty("out_data").toString();
- lastInData = ((ServiceReference)cp.getPath().get(cp.getPath().size()-1)).getProperty("in_data").toString();
+ firstOutData = ((Converter) cp.getPath().get(0)).getOutData();
+ lastInData = ((Converter)cp.getPath().get(cp.getPath().size()-1)).getInData();
if(firstOutData.equals(lastInData)){
addTestPath(cp);
}
@@ -103,7 +116,7 @@
private void addCompareCycle(ConverterPath cp){
if(cp.getOutData() != null){
if(cp.getOutData().equals(ConverterGraph.testOutData)){
- String key = cp.getInData() + " " + ((ServiceReference)cp.getPath().get(0)).getProperty("out_data").toString();
+ String key = cp.getInData() + " " + ((Converter) cp.getPath().get(0)).getOutData();
//System.out.println(key);
if(this.fileExtensionCompareConverters.get(key) == null){
@@ -122,36 +135,36 @@
}
}
- private static ArrayList removeReferences(ArrayList al, ConverterPath cp){
- ArrayList srs = new ArrayList(al);
- srs.removeAll(cp.getPath());
- ArrayList forbidden = new ArrayList();
- for(int i = 0; i < srs.size(); i++){
- ServiceReference sr = (ServiceReference)srs.get(i);
- String ss = sr.getProperty("out_data").toString();
- if(ss.startsWith("file-ext") && (!ss.equals(cp.getInData()))){
+ private static List removeReferences(List al, ConverterPath cp){
+ List cs = new ArrayList(al);
+ cs.removeAll(cp.getPath());
+ List forbidden = new ArrayList();
+ for(int i = 0; i < cs.size(); i++){
+ Converter c = (Converter) cs.get(i);
+ String outData = c.getOutData();
+ if(outData.startsWith("file-ext") && (!outData.equals(cp.getInData()))){
- forbidden.add(sr);
+ forbidden.add(c);
}
}
- srs.removeAll(forbidden);
- return srs;
+ cs.removeAll(forbidden);
+ return cs;
}
private void addTestPath(ConverterPath p){
String key = p.getInData();
key += " ";
- key += ((ServiceReference)p.getPath().get(0)).getProperty("out_data").toString();
+ key += ((Converter)p.getPath().get(0)).getOutData();
if(this.fileExtensionTestConverters.get(key) == null){
- ArrayList paths = new ArrayList();
+ List paths = new ArrayList();
paths.add(p);
this.fileExtensionTestConverters.put(key, paths);
}
else{
- ((ArrayList)this.fileExtensionTestConverters.get(key)).add(p);
+ ((List)this.fileExtensionTestConverters.get(key)).add(p);
}
}
@@ -159,7 +172,7 @@
public String printTestConverterPath(String s){
StringBuffer sb = new StringBuffer();
- ArrayList al = (ArrayList)this.fileExtensionTestConverters.get(s);
+ List al = (List)this.fileExtensionTestConverters.get(s);
for(int i = 0; i < al.size(); i++){
ConverterPath cp = (ConverterPath)al.get(i);
sb.append(cp.toString());
@@ -205,23 +218,23 @@
keySet = (String[])this.inDataToAlgorithm.keySet().toArray(keySet);
for(int i = 0; i < keySet.length; i++){
String s = keySet[i];
- str.append(s + "\n");
- ArrayList al = (ArrayList)this.inDataToAlgorithm.get(s);
+ str.append(s + "\r\n");
+ List al = (List)this.inDataToAlgorithm.get(s);
for(int j = 0; j < al.size(); j++){
- ServiceReference sr = (ServiceReference)al.get(j);
- str.append("\t" + sr.getProperty("service.pid") + "\n");
+ Converter c = (Converter)al.get(j);
+ str.append("\t" + c.getUniqueName() + "\r\n");
}
}
- str.append("Test Paths:\n");
+ str.append("Test Paths:\r\n");
str.append(printTestConverterPaths());
- str.append("Comparison Paths:\n");
+ str.append("Comparison Paths:\r\n");
str.append(printComparisonConverterPaths());
str.trimToSize();
return str.toString();
}
public ConverterPath[] getTestPath(String s){
- return (ConverterPath[])((ArrayList)this.fileExtensionTestConverters.get(s)).toArray(new ConverterPath[0]);
+ return (ConverterPath[])((List)this.fileExtensionTestConverters.get(s)).toArray(new ConverterPath[0]);
}
public ConverterPath[][] getTestPaths(){
@@ -241,7 +254,7 @@
public ConverterPath[] getComparePaths(){
String[] fileExtensions = (String[])this.fileExtensionCompareConverters.keySet().toArray(new String[0]);
- ArrayList graphs = new ArrayList();
+ List graphs = new ArrayList();
for(int i = 0; i < fileExtensions.length; i++){
graphs.add(getComparePath(fileExtensions[i]));
}
@@ -256,6 +269,10 @@
return this.fileExtensionTestConverters;
}
+ public Converter[] getAllConverters() {
+ return this.converters;
+ }
+
public File asNWB() {
File f = getTempFile();
Map nodes = assembleNodesSet();
@@ -275,7 +292,7 @@
private void writeNodeHeader(BufferedWriter bw, int numNodes) throws IOException{
bw.flush();
- bw.write("*Nodes " + numNodes + "\nid*int label*string\n");
+ bw.write("*Nodes " + numNodes + "\r\nid*int label*string\r\n");
}
@@ -285,14 +302,14 @@
keySet = (String[])nodes.keySet().toArray(keySet);
for(int i = 0; i < keySet.length; i++){
bw.flush();
- bw.write(nodes.get(keySet[i]) + " \"" + keySet[i]+"\"\n");
+ bw.write(nodes.get(keySet[i]) + " \"" + keySet[i]+"\"\r\n");
}
}
private void writeEdgeHeader(BufferedWriter bw, int numEdges) throws IOException{
bw.flush();
- bw.write("*DirectedEdges " + numEdges + "\nsource*int target*int\n");
+ bw.write("*DirectedEdges " + numEdges + "\r\nsource*int target*int\r\n");
}
@@ -304,7 +321,7 @@
for(int i = 0; i < edgeArray.length; i++){
bw.flush();
- bw.write(edgeArray[i]+"\n");
+ bw.write(edgeArray[i]+"\r\n");
}
}
@@ -319,13 +336,13 @@
for(int i = 0; i < keySet.length; i++){
String s = keySet[i];
nodeNames.add(s);
- ArrayList paths = (ArrayList)this.inDataToAlgorithm.get(s);
- ServiceReference[] references = new ServiceReference[paths.size()];
- references = (ServiceReference[])paths.toArray(references);
+ List paths = (List)this.inDataToAlgorithm.get(s);
+ Converter[] convs = new Converter[paths.size()];
+ convs = (Converter[])paths.toArray(convs);
- for(int j = 0; j < references.length; j++){
- ServiceReference r = references[j];
- nodeNames.add(r.getProperty("service.pid").toString());
+ for(int j = 0; j < convs.length; j++){
+ Converter c = convs[j];
+ nodeNames.add(c.getUniqueName());
}
}
@@ -333,7 +350,6 @@
names = (String[])nodeNames.toArray(names);
for(int i = 0; i < names.length; i++){
- System.out.println(names[i] + " " + (i+1));
nodesToInt.put(names[i], new Integer(i+1));
}
@@ -346,19 +362,16 @@
keySet = (String[])m.keySet().toArray(keySet);
for(int i = 0; i < keySet.length; i++){
String s = keySet[i];
- System.out.println(keySet[i]);
- ArrayList paths = (ArrayList)this.inDataToAlgorithm.get(s);
+ List paths = (List)this.inDataToAlgorithm.get(s);
if(paths != null){
- ServiceReference[] references = new ServiceReference[paths.size()];
- references = (ServiceReference[])paths.toArray(references);
+ Converter[] convs = new Converter[paths.size()];
+ convs = (Converter[])paths.toArray(convs);
- for(int j = 0; j < references.length; j++){
+ for(int j = 0; j < convs.length; j++){
String output1 = m.get(s).toString() + " ";
- String output2 = references[j].getProperty("service.pid").toString();
+ String output2 = convs[j].getUniqueName();
output1 += m.get(output2).toString();
- output2 = m.get(output2).toString() + " " + m.get(references[j].getProperty("out_data")).toString();
- System.out.println(output1);
- System.out.println(output2);
+ output2 = m.get(output2).toString() + " " + m.get(convs[j].getOutData());
edges.add(output1);
edges.add(output2);
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -3,7 +3,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.cishell.framework.algorithm.AlgorithmFactory;
import org.cishell.framework.algorithm.AlgorithmProperty;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
@@ -16,12 +15,8 @@
private String in_data = null;
private String out_data = null;
- private ArrayList path;
+ private List path;
- private boolean algPathCached = false;
- private ArrayList algPath;
-
-
public ConverterPath(BundleContext bContext, LogService log){
this.bContext = bContext;
this.log = log;
@@ -49,20 +44,16 @@
this.out_data = s;
}
- public boolean addAlgorithm(ServiceReference sr){
+ public boolean add(Converter c){
boolean val = true;
- if(path.contains(sr)){
-// System.out.println("Path already contains " + sr.getProperty("service.pid"));
-
+ if(path.contains(c)){
return false;
}
-
- path.add(sr);
- invalidateAlgPath();
- this.setOutData(sr.getProperty("out_data").toString());
+ path.add(c);
+ this.setOutData(c.getOutData());
return val;
}
@@ -92,48 +83,50 @@
return this.path;
}
- public ServiceReference getRef(int index) {
-
- return (ServiceReference) this.path.get(index);
+ //inclusive
+ public List getPathUpTo(Converter upToConv) {
+ int convIndex = -1;
+ for (int ii = 0; ii < this.path.size(); ii++) {
+ Converter aConvInPath = get(ii);
+
+ if (aConvInPath.equals(upToConv)) {
+ convIndex = ii;
+ break;
+ }
+ }
+
+ if (convIndex != -1) {
+ return this.path.subList(0, convIndex + 1);
+ } else {
+ throw new IllegalArgumentException("Attempted to get a " +
+ "subsection of a path up until a converter " +
+ "that does not exist in the original path");
+ }
}
- public AlgorithmFactory getAlg(int index) {
-
- if (! algPathCached) cacheAlgPath();
- return (AlgorithmFactory) this.algPath.get(index);
+ public Converter get(int index) {
+ return (Converter) this.path.get(index);
}
- public ServiceReference[] getPathAsArray(){
+ public ServiceReference getRef(int index) {
- return (ServiceReference[])this.path.toArray(new ServiceReference[0]);
+ Converter c = (Converter) this.path.get(index);
+ ServiceReference ref = c.getRef();
+ return ref;
}
- public AlgorithmFactory[] getPathAsAlgorithms(){
+ public Converter[] getPathAsArray(){
- if (! algPathCached) cacheAlgPath();
-
- return (AlgorithmFactory[]) this.algPath.toArray(new AlgorithmFactory[0]);
+ return (Converter[]) this.path.toArray(new Converter[0]);
}
- public String toString(){
-
- String val = this.in_data +" -->\n";
-
- for(int i = 0; i < this.path.size(); i++){
- ServiceReference sr = (ServiceReference)this.path.get(i);
- val += "\t" + sr.getProperty("service.pid") + "\n";
- }
- val += "--> " + this.out_data + "\n";
- return val;
- }
-
public boolean isLossy() {
String lossiness = LOSSLESS;
for (int i = 0; i < this.path.size(); i++) {
- ServiceReference sr = (ServiceReference) this.path.get(i);
+ Converter c = (Converter) this.path.get(i);
- if (LOSSY.equals(sr.getProperty(CONVERSION))) {
+ if (c.isLossy()) {
lossiness = LOSSY;
}
}
@@ -148,51 +141,12 @@
return false;
}
-
- public ConverterPath appendNonMutating(ConverterPath otherPath) {
-
- List thisConvPath = this.path;
- List otherConvPath = otherPath.getPath();
-
- List thisConvPathCopy = new ArrayList(thisConvPath);
- thisConvPathCopy.addAll(otherConvPath);
- ConverterPath combinedPath = new ConverterPath(this.bContext, this.log);
-
- List combinedConvPath = thisConvPathCopy;
- for (int ii = 0; ii < combinedConvPath.size(); ii++) {
- ServiceReference sr = (ServiceReference) combinedConvPath.get(ii);
-
- combinedPath.addAlgorithm(sr);
- }
-
- return combinedPath;
- }
-
public int size() {
return this.path.size();
}
public String getConverterName(int index) {
- return (String) getRef(index).getProperty("service.pid");
+ return (String) get(index).getUniqueName();
}
-
-
- private void cacheAlgPath() {
- this.algPath = new ArrayList();
-
- for (int i = 0; i < this.path.size(); i++){
- ServiceReference sr = (ServiceReference)this.path.get(i);
-
- AlgorithmFactory alg = (AlgorithmFactory) this.bContext.getService(sr);
- this.algPath.add(alg);
- }
-
- this.algPathCached = true;
- }
-
- private void invalidateAlgPath() {
-
- this.algPathCached = false;
- }
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/service/ConfigurationFileParser.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/service/ConfigurationFileParser.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/service/ConfigurationFileParser.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -193,7 +193,7 @@
if(!f.isHidden()){
if(f.isDirectory()){
output += "Directory: ";
- output += f.getName()+ "\n";
+ output += f.getName()+ "\r\n";
File[] files = f.listFiles();
for (int ii = 0; ii < files.length; ii++){
File ff = files[ii];
@@ -201,7 +201,7 @@
}
}
else{
- output += "\t" + f.getName() + "\n";
+ output += "\t" + f.getName() + "\r\n";
}
}
return output;
@@ -209,29 +209,29 @@
public String toString(){
String output = "";
- output += "Files to test:\n";
+ output += "Files to test:\r\n";
Iterator iter0 = this.comparisonFiles.iterator();
while (iter0.hasNext()){
File f = (File) iter0.next();
output += asString(f,"");
}
- output += "\nConverters to test:\n";
+ output += "\r\nConverters to test:\r\n";
Iterator iter1 = this.testConverters.iterator();
while (iter1.hasNext()){
String s = (String) iter1.next();
- output += s + "\n";
+ output += s + "\r\n";
}
- output += "\nConverters used to Compare files:\n";
+ output += "\r\nConverters used to Compare files:\r\n";
Iterator ii2 = this.comparisonConverters.iterator();
while (ii2.hasNext()){
String s = (String) ii2.next();
- output += s +"\n";
+ output += s +"\r\n";
}
- output += "\nNode IDs are expected to change: " + this.nodeIDChange + "\n";
+ output += "\r\nNode IDs are expected to change: " + this.nodeIDChange + "\r\n";
return output;
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/ReportREADME.txt
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/ReportREADME.txt 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/ReportREADME.txt 2007-08-30 19:07:57 UTC (rev 497)
@@ -5,22 +5,6 @@
There are three major reports: All Tests Report,
All Converters Report, and Annotated Graph Report.
-Bug Notes: The following problems (as well as others)
-are known, and should be corrected.
-
-1. Data Manager is unable to collapse trees of
- data by default.
-
-2. Some annoying converters output their
-exceptions to the logger directly instead
-of returning them. We need to redirect this
-information into the reports.
-
-3. CIShell sometimes goofs with the numbering
-of the reports, and either changes the last
-digit or adds ".1" to the end of everything.
-
-
ALL TESTS REPORT
All Tests Report provides results test by test.
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/ConverterTester.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -186,8 +186,8 @@
public String toString(){
String output = "";
output += cfp.toString();
- output += testConverters.toString()+"\n";
- output += comparisonConverters.toString()+"\n";
+ output += testConverters.toString()+"\r\n";
+ output += comparisonConverters.toString()+"\r\n";
return output;
}
@@ -220,7 +220,7 @@
return true;
}
catch (IOException ioe) {
- System.out.println("Copy Error: IOException during copy\n" + ioe.getMessage());
+ System.out.println("Copy Error: IOException during copy\r\n" + ioe.getMessage());
return false;
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/ComparisonResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/ComparisonResult.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/ComparisonResult.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -22,8 +22,8 @@
if (comparisonSucceeded()) {
return "Success!";
} else {
- return "Failure: " + "\n" +
- "Log:" + "\n" +
+ return "Failure: " + "\r\n" +
+ "Log:" + "\r\n" +
log;
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/RunningLog.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/RunningLog.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/RunningLog.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -9,11 +9,11 @@
* @param s the text to be added to the log.
*/
public void append(String s) {
- log += s +"\n";
+ log += s +"\r\n";
}
public void prepend(String s) {
- log = s + "\n" + log;
+ log = s + "\r\n" + log;
}
public String getLog() {
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -13,17 +13,23 @@
import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
import org.cishell.framework.data.DataProperty;
+import org.cishell.testing.convertertester.core.converter.graph.Converter;
import org.cishell.testing.convertertester.core.converter.graph.ConverterGraph;
import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.IdsNotPreservedComparer;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.IdsPreservedComparer;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.LossyComparer;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer;
+import org.cishell.testing.convertertester.core.tester2.reportgen.ConvResultMaker;
import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
+import org.cishell.testing.convertertester.core.tester2.reportgen.faultanalysis.ChanceAtFaultHeuristic;
+import org.cishell.testing.convertertester.core.tester2.reportgen.faultanalysis.FullTrustHeuristic;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllConvsResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.TestResult;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogService;
/**
@@ -52,28 +58,48 @@
* Tests the provided converters, and passes the results of those tests to
* the report generators. Report Generators are side-effected, which takes
* the place of a return value.
+ * @param converterRefs service reference for all the converters.
* @param reportGenerators process the test results.
* @param cContext the CIShell Context
* @param bContext the Bundle Context
*/
public void execute(
- ConverterGraph converterGraph,
+ ServiceReference[] converterRefs,
ReportGenerator[] reportGenerators,
CIShellContext cContext,
BundleContext bContext) {
+ //generate all the converter paths
+
+ ConverterGraph converterGraph = new ConverterGraph(converterRefs,
+ bContext, this.log);
+
//run the tests
TestResult[] rawResults =
runAllTests(converterGraph, cContext, bContext);
+
+ System.out.println("Num Test Results coming out of runAllTests" +
+ ": " + rawResults.length);
+
AllTestsResult allTestsResult = new AllTestsResult(rawResults);
+ //analyze the test results to extract more useful info
+
+ Converter[] allConverters = converterGraph.getAllConverters();
+
+ ChanceAtFaultHeuristic faultHeuristic = new FullTrustHeuristic();
+ AllConvsResult allConvertersResult =
+ ConvResultMaker.generate(allTestsResult, allConverters,
+ faultHeuristic);
+
//feed test results to the report generators
for (int ii = 0; ii < reportGenerators.length; ii++) {
ReportGenerator reportGenerator = reportGenerators[ii];
- reportGenerator.generateReport(allTestsResult);
+ reportGenerator.generateReport(allTestsResult,
+ allConvertersResult, converterGraph.asNWB());
}
}
@@ -89,6 +115,8 @@
Set fileFormats = fileFormatToTestConvs.keySet();
+ System.out.println("Number of file formats provided by convGraph : " +
+ fileFormats.size());
/*
* for each file format, get the corresponding test converter paths
* and comparison converter path.
@@ -106,6 +134,9 @@
ConverterPath[] testConvs =
(ConverterPath[]) testConvList.toArray(new ConverterPath[0]);
+ System.out.println("Test converters for this file format : " +
+ testConvs.length);
+
ConverterPath compareConv =
(ConverterPath) fileFormatToCompareConvs.get(fileFormat);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -9,20 +9,19 @@
import java.util.Hashtable;
import java.util.List;
-import org.cishell.framework.algorithm.Algorithm;
-import org.cishell.framework.algorithm.AlgorithmFactory;
import org.cishell.framework.data.BasicData;
import org.cishell.framework.data.Data;
+import org.cishell.testing.convertertester.core.converter.graph.Converter;
import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
import org.cishell.testing.convertertester.core.tester.graphcomparison.ComparisonResult;
+import org.cishell.testing.convertertester.core.tester2.fakelogger.FakeLogCIShellContext;
import org.cishell.testing.convertertester.core.tester2.fakelogger.LogEntry;
-import org.cishell.testing.convertertester.core.tester2.fakelogger.FakeLogCIShellContext;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.converter.ConvFailureInfo;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.ComparePhaseFailure;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.ConvertPhaseFailure;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.FilePassFailure;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.FilePassSuccess;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.PassPhase;
import org.osgi.service.log.LogService;
import prefuse.data.Graph;
@@ -53,46 +52,46 @@
testConverters, testData);
if (!testPhaseResult.succeeded()) {
- ConvertPhaseFailure failure = new ConvertPhaseFailure(
- originalFileData, testPhaseResult.getFailInfo(),
- ConvertPhaseFailure.TEST_PHASE);
+ FilePassFailure failure = createFailResult(originalFileData,
+ PassPhase.TEST_CONV_PHASE,
+ testPhaseResult.getFailInfo());
testResults.add(failure);
continue;
}
Data[] resultFileData = testPhaseResult.getResult();
- // comparison conversion phase
+ // comparison conversion (for original file) phase
- ConvertResult comparisonPhaseResult1 = convert(originalFileData,
+ ConvertResult comparePhaseOrigResult = convert(originalFileData,
comparisonConverters, testData);
- if (!comparisonPhaseResult1.succeeded()) {
- ConvertPhaseFailure failure = new ConvertPhaseFailure(
- originalFileData,
- comparisonPhaseResult1.getFailInfo(),
- ConvertPhaseFailure.TEST_PHASE);
+ if (!comparePhaseOrigResult.succeeded()) {
+ FilePassFailure failure = createFailResult(originalFileData,
+ PassPhase.COMPARE_CONV_ORIG_PHASE,
+ comparePhaseOrigResult.getFailInfo());
testResults.add(failure);
continue;
}
- Data[] originalInMemory = comparisonPhaseResult1.getResult();
+ Data[] originalInMemory = comparePhaseOrigResult.getResult();
- ConvertResult comparisonPhaseResult2 = convert(resultFileData,
+ //comparison conversion (for result file) phase
+
+ ConvertResult comparePhaseResultResult = convert(resultFileData,
comparisonConverters, testData);
- if (!comparisonPhaseResult2.succeeded()) {
- ConvertPhaseFailure failure = new ConvertPhaseFailure(
- originalFileData,
- comparisonPhaseResult2.getFailInfo(),
- ConvertPhaseFailure.COMPARISON_PHASE);
+ if (!comparePhaseResultResult.succeeded()) {
+ FilePassFailure failure = createFailResult(originalFileData,
+ PassPhase.COMPARE_CONV_RESULT_PHASE,
+ comparePhaseResultResult.getFailInfo());
testResults.add(failure);
continue;
}
- Data[] resultInMemory = comparisonPhaseResult2.getResult();
+ Data[] resultInMemory = comparePhaseResultResult.getResult();
// graph comparison phase
+ Graph resultGraph = (Graph) originalInMemory[0].getData();
Graph origGraph = (Graph) resultInMemory[0].getData();
- Graph resultGraph = (Graph) originalInMemory[0].getData();
NewGraphComparer comparer = testData.getComparer();
ComparisonResult graphComparisonPhaseResult = comparer.compare(
@@ -101,14 +100,15 @@
if (!graphComparisonPhaseResult.comparisonSucceeded()) {
String explanation =
graphComparisonPhaseResult.getLog();
- ComparePhaseFailure failure = new ComparePhaseFailure(
- originalFileData,
- explanation);
+ FilePassFailure failure = createFailResult(originalFileData,
+ explanation, PassPhase.COMPARE_CONV_RESULT_PHASE,
+ null);
testResults.add(failure);
continue;
}
- FilePassSuccess success = new FilePassSuccess(originalFileData);
+ FilePassSuccess success = new FilePassSuccess(originalFileData,
+ "");
testResults.add(success);
}
@@ -121,7 +121,6 @@
ConverterPath converters, TestConfigData testData) {
Data[] currentData = getFilePathData(startData);
- AlgorithmFactory[] converterAlgs = converters.getPathAsAlgorithms();
/*
* rig up fake CISHellContext so we can get ahold of
@@ -130,15 +129,16 @@
FakeLogCIShellContext fakeCContext =
new FakeLogCIShellContext(testData.getContext());
- AlgorithmFactory currentConverterAlg = converterAlgs[0];
+ Converter currentConverter = converters.get(0);
try {
- for (int ii = 0; ii < converterAlgs.length; ii++) {
- currentConverterAlg = converterAlgs[ii];
+ for (int ii = 0; ii < converters.size(); ii++) {
+ currentConverter = converters.get(ii);
- Algorithm currentAlgorithm =
- currentConverterAlg.createAlgorithm(currentData,
- new Hashtable(), fakeCContext);
- currentData = currentAlgorithm.execute();
+ //no parameters used
+ Hashtable parameters = new Hashtable();
+
+ currentData = currentConverter.execute(currentData,
+ parameters, fakeCContext);
/*
* There are two ways that converters generally fail.
@@ -148,21 +148,21 @@
* and return null.
*/
if (currentData == null || currentData[0].getData() == null) {
- String converterName = converters.getConverterName(ii);
+ Converter converter = converters.get(ii);
- String explanation = "Result data is null. \n";
+ String explanation = "Result of conversion was null. \r\n";
if (fakeCContext.hasLogEntries()) {
String logText = extractLogText(fakeCContext);
- explanation += "Error log contains the following: \n" +
+ explanation += "Error log contains the following: \r\n" +
logText;
} else {
- explanation += "No errors logged. Cause unknown. \n";
+ explanation += "No errors logged. Cause unknown. \r\n";
}
ConvFailureInfo failInfo = new ConvFailureInfo(
- explanation, converterName);
+ explanation, converter);
ConvertResult result = new ConvertResult(failInfo);
return result;
@@ -170,7 +170,7 @@
}
} catch (Throwable t) {
ConvFailureInfo failInfo = new ConvFailureInfo(getStackTrace(t),
- currentConverterAlg.getClass().toString());
+ currentConverter);
ConvertResult result = new ConvertResult(failInfo);
return result;
}
@@ -179,6 +179,20 @@
ConvertResult result = new ConvertResult(resultData);
return result;
}
+
+ private FilePassFailure createFailResult(Data[] origData,
+ String explanation, PassPhase lastReachedPhase,
+ Converter failedConverter) {
+ FilePassFailure failure = new FilePassFailure(origData, explanation,
+ lastReachedPhase, failedConverter);
+ return failure;
+ }
+
+ private FilePassFailure createFailResult(Data[] origData,
+ PassPhase lastReachedPhase, ConvFailureInfo failInfo) {
+ return createFailResult(origData, failInfo.getExplanation(),
+ lastReachedPhase, failInfo.getFailedConverter());
+ }
private class ConvertResult {
@@ -248,9 +262,9 @@
Throwable e = entry.getThrowable();
String message = entry.getMessage();
- logText += message + "\n";
- logText += getStackTrace(e) + "\n";
- logText += "\n";
+ logText += message + "\r\n";
+ logText += getStackTrace(e) + "\r\n";
+ logText += "\r\n";
}
return logText;
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/ComplexGraphComparer.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/ComplexGraphComparer.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/ComplexGraphComparer.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -151,7 +151,6 @@
}
if (! foundMatch) {
- log.append("Tables do not have the same columns");
log.append("One table has the column '" +
t2.getColumnName(ii) + "', while the other does " +
"not.");
Deleted: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -1,304 +0,0 @@
-package org.cishell.testing.convertertester.core.tester2.reportgen;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvResult;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.TestResult;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.converter.ConvFilePassFailure;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.converter.ConvFilePassSuccess;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.ComparePhaseFailure;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.ConvertPhaseFailure;
-import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.FilePassSuccess;
-import org.osgi.framework.ServiceReference;
-
-/**
- *
- * @author mwlinnem
- *
- *
- */
-public class ConvResultMaker {
-
- /**
- * Takes an array of ConverterTester results that are organized by test,
- * and returns an array of ConverterTester results organized by converter.
- * This should make it easier for report generators to display
- * data about how correct or incorrect each converter is, as oppose to
- * which tests failed or succeeded.
- * @param trs The results of testing the converters, organized by test
- * @return the results of testing the converters, organized by converter
- */
- public ConvResult[] generate(AllTestsResult atr) {
- TestResult[] trs = atr.getTestResults();
-
- //maps convert testers to their test result data.
- Map resultHolder = new HashMap();
-
- resultHolder = addTests(trs, resultHolder);
- resultHolder = markTrusted(trs, resultHolder);
- resultHolder = createConverterResults(trs, resultHolder);
-
- ConvResult[] results = extractResults(resultHolder);
- return results;
- }
-
- /**
- *
- * For each test result, go through each of the converters involved
- * in the tests, letting each converter know which tests they are
- * involved in.
- *
- * @param trs the test results
- * @param rh the result holder, without converters knowing which tests
- * they are used in
- * @return the result holder, with converters that know which tests
- * they are used in
- */
- private Map addTests(TestResult[] trs, Map rh) {
- for (int ii = 0; ii < trs.length; ii++) {
- TestResult tr = trs[ii];
-
- ConverterPath convPath = tr.getAllConverters();
-
- for (int jj = 0; jj < convPath.size(); jj++) {
- ConvResult ctr = getResult(rh, convPath.getRef(jj));
- ctr.addTest(tr);
- }
- }
-
- return rh;
- }
-
- /**
- * Looks for tests where each file pass succeeded. We will assume that
- * each converter involved in a test where all file passes succeeded is
- * very likely to be correct. If one of these converters is involved
- * in a file pass that fails at some later point, we will assume
- * that that converter was not at fault, but was fed erroneous data
- * by previous converters.
- * @param trs the converter tester results organized by test
- * @param rh the result holder, which keeps track of the converter results.
- * @return the result holder, which is side-effected with trust info.
- */
- private Map markTrusted( TestResult[] trs, Map rh) {
- for (int ii = 0; ii < trs.length; ii++) {
- TestResult tr = trs[ii];
- FilePassResult[] fprs = tr.getFilePassResults();
-
- //check if all file passes were successes
- boolean trusted = true;
- for (int jj = 0; jj < fprs.length; jj++) {
- FilePassResult fpr = fprs[jj];
- if (! passed(fpr)) {
- //not all were successes
- trusted = false;
- break;
- }
- }
-
- if (trusted && fprs.length > 0) {
- //mark all converters involved as trusted.
- ConverterPath allConvs = tr.getTestConverters();
- for (int kk = 0; kk < allConvs.size(); kk++) {
- ConvResult ctr = getResult(rh, allConvs.getRef(kk));
- ctr.setTrusted(true);
- }
- }
- }
-
- return rh;
- }
-
- /**
- * Associate each converter with the file passes that involved it,
- * also keeping track of whether the file pass succeeded or not. If the
- * file pass did not succeed, record what chance each converter had
- * of being at fault.
- * @param trs the converter tester results organized by test
- * @param rh the result holder, which keeps track of the converter
- * results, which now holds info on which converters are trusted.
- * @return the result holder, which is side-effected with
- * success/failure info
- */
- private Map createConverterResults( TestResult[] trs, Map rh) {
- for (int ii = 0; ii < trs.length; ii++) {
- TestResult tr = trs[ii];
- FilePassResult[] fprs = tr.getFilePassResults();
-
- for (int jj = 0; jj < fprs.length; jj++) {
- FilePassResult fpr = fprs[jj];
- if (passed(fpr)) {
- FilePassSuccess fprSuccess = (FilePassSuccess) fpr;
- createPassResult(fprSuccess, rh);
- } else if (failedOnConverterPhase(fpr)) {
- ConvertPhaseFailure fprFailure = (ConvertPhaseFailure) fpr;
- createPassResult(fprFailure, rh);
- } else if (failedOnGraphComparePhase(fpr)) {
- ComparePhaseFailure fprFailure = (ComparePhaseFailure) fpr;
- createPassResult(fprFailure, rh);
- }
- }
- }
-
- return rh;
- }
-
- /**
- * Simply gets the converter results out of the result holder.
- * @param rh the result holder, which keeps track of the converter
- * results, which now holds all the trust and success/failure info
- * @return the converter results
- */
- private ConvResult[] extractResults(Map rh) {
- Collection values = rh.values();
- ConvResult[] results =
- (ConvResult[]) values.toArray(new ConvResult[0]);
- return results;
- }
-
- private void createPassResult(FilePassSuccess fprSuccess, Map rh) {
- ConverterPath allConvs =
- fprSuccess.getParent().getAllConverters();
-
- for (int kk = 0; kk < allConvs.size(); kk++) {
- ConvResult ctr = getResult(rh,allConvs.getRef(kk));
- ctr.addPass(fprSuccess);
- }
- }
-
- private void createPassResult(ConvertPhaseFailure fprFailure, Map rh) {
- TestResult parent = fprFailure.getParent();
-
- ConverterPath testConvs = parent.getTestConverters();
-
- ConverterPath compareConvs = parent.getComparisonConverters();
-
- String failedConvName = fprFailure.getFailedConverter();
-
- List possiblyResponsible = new ArrayList();
- List involvedButNotResponsible = new ArrayList();
-
- for (int kk = 0; kk < testConvs.size(); kk++) {
- ServiceReference testConvRef = testConvs.getRef(kk);
-
-
- ConvResult ctr = getResult(rh, testConvRef);
-
- involvedButNotResponsible.add(ctr);
- if (! ctr.isTrusted()) {
- possiblyResponsible.add(ctr);
-
- }
-
- String currentConvName = (String) testConvRef.getProperty("service.pid");
-
- if (fprFailure.getPhase().equals(ConvertPhaseFailure.TEST_PHASE) &&
- failedConvName.equals(currentConvName)) {
- //reached where the converters broke
- break;
- }
- }
-
- if (fprFailure.getPhase().equals(ConvertPhaseFailure.COMPARISON_PHASE)) {
- for (int kk = 0; kk < compareConvs.size(); kk++) {
- ServiceReference compareConvRef = testConvs.getRef(kk);
-
- ConvResult ctr = getResult(rh, compareConvRef);
- if (ctr.isTrusted()) {
- involvedButNotResponsible.add(ctr);
-
- } else {
- possiblyResponsible.add(ctr);
- }
-
- String currentConvName = (String) compareConvRef.getProperty("service.pid");
- if (failedConvName.equals(currentConvName)) {
- //reached where the converters broke
- break;
- }
- }
- }
-
- float chanceEachResponsible = 1.0f / possiblyResponsible.size();
-
- Iterator iter = possiblyResponsible.iterator();
- while (iter.hasNext()) {
- ConvResult ctr = (ConvResult) iter.next();
- ctr.addPass(fprFailure, chanceEachResponsible);
- }
-
- Iterator iter2 = involvedButNotResponsible.iterator();
- while (iter.hasNext()) {
- ConvResult ctr = (ConvResult) iter2.next();
- //TODO: May want to give these a slight chance of being responsible.
- ctr.addPass(fprFailure, 0.0f);
- }
-
- }
-
- private void createPassResult(ComparePhaseFailure fprFailure, Map rh) {
- ConverterPath allConvs = fprFailure
- .getParent().getTestConverters();
-
- List trustedConvs = new ArrayList();
- List nonTrustedConvs = new ArrayList();
- for (int ii = 0; ii < allConvs.size(); ii++) {
- ConvResult ctr = getResult(rh, allConvs.getRef(ii));
-
- if (! ctr.isTrusted()) {
- nonTrustedConvs.add(ctr);
- } else {
- trustedConvs.add(ctr);
- }
- }
-
- float chanceEachResponsible = 1.0f / nonTrustedConvs.size();
- for (int ii = 0; ii < nonTrustedConvs.size(); ii++) {
- ConvResult ctr = (ConvResult) nonTrustedConvs.get(ii);
- ctr.addPass(fprFailure, chanceEachResponsible);
- }
-
- for (int ii = 0; ii < trustedConvs.size(); ii++) {
- ConvResult ctr = (ConvResult) trustedConvs.get(ii);
- ctr.addPass(fprFailure, 0.0f);
- }
- }
-
- private ConvResult getResult(Map rh, ServiceReference conv) {
- ConvResult newResult;
-
- Object currentTestResult = rh.get(conv);
-
- //check if we have recorded a converter result for this converter yet.
- if (currentTestResult == null) {
- //we have not yet created a converter result. Make a new one.
- newResult = new ConvResult(conv);
- rh.put(conv, newResult);
- } else {
- //We have created a converter result. Return it.
- newResult = (ConvResult) currentTestResult;
- }
-
- return newResult;
- }
-
- private boolean passed(FilePassResult fpr) {
- return fpr instanceof FilePassSuccess;
- }
-
- private boolean failedOnConverterPhase(FilePassResult fpr) {
- return fpr instanceof ConvertPhaseFailure;
- }
-
- private boolean failedOnGraphComparePhase(FilePassResult fpr) {
- return fpr instanceof ComparePhaseFailure;
- }
-}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ReportGenerator.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ReportGenerator.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -2,6 +2,7 @@
import java.io.File;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllConvsResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
@@ -10,5 +11,7 @@
public static final String FS = File.separator;
public static final String TEMP_DIR = "tmp" + FS;
- public void generateReport(AllTestsResult atr);
+ public void generateReport(AllTestsResult atr,
+ AllConvsResult acr,
+ File nwbConvGraph);
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-25 20:32:52 UTC (rev 496)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-30 19:07:57 UTC (rev 497)
@@ -7,10 +7,10 @@
import java.util.ArrayList;
import java.util.List;
-import org.cishell.testing.convertertester.core.tester2.reportgen.ConvResultMaker;
import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.AllConvsReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.ConvReport;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllConvsResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.AllTestsResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvResult;
import org.osgi.service.log.LogService;
@@ -31,10 +31,11 @@
this.convSubGen = new ConvReportSubGenerator(this.log);
}
- public void generateReport(AllTestsResult atr) {
+ public void generateReport(AllTestsResult atr,
+ AllConvsResult acr,
+ File nwbConvGraph) {
- ConvResultMaker convGen = new ConvResultMaker();
- ConvResult[] convResults = convGen.generate(atr);
+ ConvResult[] convResults = acr.getConvResults();
FileOutputStream reportOutStream = null;
try {
@@ -46,18 +47,25 @@
report.println("---------------------------------------------");
report.println("" );
- float passedPercentTotal = convResults[0].getPercentPassed();
- for (int ii = 1; ii < convResults.length; ii++) {
+ float passedPercentTotal = 0;
+ for (int ii = 0; ii < convResults.len...
[truncated message content] |
|
From: <hu...@us...> - 2007-08-27 17:41:34
|
Revision: 496
http://cishell.svn.sourceforge.net/cishell/?rev=496&view=rev
Author: huangb
Date: 2007-08-25 13:32:52 -0700 (Sat, 25 Aug 2007)
Log Message:
-----------
many .net testdata from Pajek
Added Paths:
-----------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/1CRN.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/AHO1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/AHO2.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/AHO3.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/AHO4.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/B.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/C.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/CC.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/CENPROD.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/CIRC.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/CITE.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/CP.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/CPM1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/CPM2.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/CPM3.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/CVRML.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/CX.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/D.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/DNA.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/DREV1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/DREVO.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/ETHANOL.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FILE1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FLOW.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FLOW3.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FLOW4.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FRAG1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FRAG1X.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FRAG1Y.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FRAG2.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FRAG3.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FRAG4.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/FRAG5.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/GCD.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/GR344.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/GR3_44.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/GR3_53.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/GR3_60.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/GR3_81.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/H20.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/HEXANE.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/KOCKA.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/KOCKA1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/KVADRAT.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/LINKS.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/LOND1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/LONDON.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/MCCABE1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/MCCABE1A.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/MCCABE2.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/MCCABE2A.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/MREZA.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/MREZA1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/MREZA2.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/MREZA3.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/MREZAS1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/MREZASHR.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/NEG.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/NEIG4.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/NOOY.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/OLDFILE.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PATH4.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETER.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI2.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI3.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI4.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI5.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI51.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI51X.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI51Y.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI52.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI52X.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI52Y.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI53.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI5X.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PETRI5Y.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PITT.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PRIME.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PRIME1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PROT.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/PROTI.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/SAMPLE10.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/SAMPLE6.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/SAMPLE9.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/SHORT.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/SHR.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/SHRINK.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/SHRINK1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/SHRINK2.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/SHRINK4.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/SLOVEN.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/STROPIC.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/T.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/TEST1.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/TINA.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/TINAMATR.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/TRANS.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/WHITT.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/WIRTH.NET
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/WRITE.NET
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/1.NET
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/1.NET (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/1.NET 2007-08-25 20:32:52 UTC (rev 496)
@@ -0,0 +1,74 @@
+*Vertices 26
+ 1 "pe0" 0.5000 0.5000 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightGreen
+ 2 "pe1" 0.8473 0.4981 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightYellow
+ 3 "pe2" 0.6112 0.8387 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightYellow
+ 4 "pe3" 0.2010 0.7205 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightYellow
+ 5 "pe4" 0.2216 0.2977 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightYellow
+ 6 "pe5" 0.6120 0.1552 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightYellow
+ 7 "pm1" 0.6188 0.4982 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic White
+ 8 "pm2" 0.5442 0.6249 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic White
+ 9 "pm3" 0.3781 0.5939 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic White
+ 10 "pm4" 0.3724 0.4074 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic White
+ 11 "pm5" 0.5453 0.3593 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic White
+ 12 "pc1" 0.6614 0.6222 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightCyan
+ 13 "pc2" 0.4299 0.7012 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightCyan
+ 14 "pc3" 0.2920 0.5134 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightCyan
+ 15 "pc4" 0.4351 0.3015 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightCyan
+ 16 "pc5" 0.6524 0.3707 0.5000 ellipse x_fact 1 lr 19 lphi 110 bw 1.5 fos 20 ic LightCyan
+ 17 "tme1" 0.7328 0.4981 0.5000 box ic Black x_fact 0.1 y_fact 2 lr 25 lphi 105 fos 20
+ 18 "tme2" 0.5790 0.7314 0.5000 box ic Black x_fact 0.1 y_fact 2 lr 25 lphi 105 fos 20 phi -72
+ 19 "tme3" 0.2857 0.6583 0.5000 box ic Black x_fact 0.1 y_fact 2 lr 25 lphi 105 fos 20 phi -144
+ 20 "tme4" 0.2913 0.3519 0.5000 box ic Black x_fact 0.1 y_fact 2 lr 25 lphi 105 fos 20 phi -216
+ 21 "tme5" 0.5826 0.2447 0.5000 box ic Black x_fact 0.1 y_fact 2 lr 25 lphi 105 fos 20 phi -288
+ 22 "tem1" 0.9505 0.4996 0.5000 box ic Blue x_fact 0.1 y_fact 2 lr 25 lphi 105 fos 20 bc Blue
+ 23 "tem2" 0.6395 0.9274 0.5000 box ic Blue x_fact 0.1 y_fact 2 lr 25 lphi 105 fos 20 phi -72 bc Blue
+ 24 "tem3" 0.1362 0.7652 0.5000 box ic Blue x_fact 0.1 y_fact 2 lr 25 lphi 105 fos 20 phi -144 bc Blue
+ 25 "tem4" 0.1392 0.2356 0.5000 box ic Blue x_fact 0.1 y_fact 2 lr 25 lphi 105 fos 20 phi -216 bc Blue
+ 26 "tem5" 0.6384 0.0741 0.5000 box ic Blue x_fact 0.1 y_fact 2 lr 25 lphi 105 fos 20 phi -288 bc Blue
+*Arcs
+ 16 21 1 s 2 w 2
+ 7 17 2 s 2 w 2
+ 1 17 1 s 2 w 2
+ 17 2 1 s 2 w 2
+ 2 22 1 s 2 w 2
+ 22 7 1 s 2 w 2 h1 0 h2 9 a1 160 a2 80 k1 1 k2 0.8
+ 22 12 1 s 2 w 2 h1 6
+ 22 16 1 s 2 w 2 h1 2
+ 16 17 1 s 2 w 2
+ 12 17 1 s 2 w 2
+ 8 18 2 s 2 w 2
+ 1 18 1 s 2 w 2
+ 18 3 1 s 2 w 2
+ 3 23 1 s 2 w 2
+ 23 8 1 s 2 w 2 h1 0 h2 1 a1 160 a2 80 k1 1 k2 0.8
+ 23 12 1 s 2 w 2 h1 2
+ 23 13 1 s 2 w 2 h1 6
+ 12 18 1 s 2 w 2
+ 13 18 1 s 2 w 2
+ 9 19 2 s 2 w 2
+ 1 19 1 s 2 w 2
+ 19 4 1 s 2 w 2
+ 4 24 1 s 2 w 2
+ 24 9 1 s 2 w 2 h1 0 h2 30 a1 160 a2 80 k1 1 k2 0.8
+ 24 13 1 s 2 w 2 h1 2
+ 24 14 1 s 2 w 2 h1 6
+ 13 19 1 s 2 w 2
+ 14 19 1 s 2 w 2
+ 10 20 2 s 2 w 2
+ 1 20 1 s 2 w 2
+ 20 5 1 s 2 w 2
+ 5 25 1 s 2 w 2
+ 25 10 1 s 2 w 2 h1 0 h2 27 a1 160 a2 80 k1 1 k2 0.8
+ 25 14 1 s 2 w 2 h1 2
+ 25 15 1 s 2 w 2 h1 6
+ 14 20 1 s 2 w 2
+ 15 20 1 s 2 w 2
+ 11 21 2 s 2 w 2
+ 1 21 1 s 2 w 2
+ 21 6 1 s 2 w 2
+ 6 26 1 s 2 w 2
+ 26 11 1 s 2 w 2 h1 0 h2 13 a1 160 a2 80 k1 1 k2 0.8
+ 26 15 1 s 2 w 2 h1 2
+ 26 16 1 s 2 w 2 h1 6
+ 15 21 1 s 2 w 2
+*Edges
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/1CRN.NET
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/1CRN.NET (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/test_files/NET Files/fromPajek/1CRN.NET 2007-08-25 20:32:52 UTC (rev 496)
@@ -0,0 +1,667 @@
+*Vertices 327
+ 1 "N" 0.7113 0.6624 0.4185 x_fact 1.540 ic 0.000 0.000 1.000
+ 2 "C" 0.7087 0.6075 0.4422 x_fact 1.850 ic 0.500 0.500 0.500
+ 3 "C" 0.6668 0.6063 0.4686 x_fact 1.850 ic 0.500 0.500 0.500
+ 4 "O" 0.6531 0.6509 0.4839 x_fact 1.400 ic 1.000 0.000 0.000
+ 5 "C" 0.7481 0.6040 0.4753 x_fact 1.850 ic 0.500 0.500 0.500
+ 6 "O" 0.7863 0.6094 0.4464 x_fact 1.400 ic 1.000 0.000 0.000
+ 7 "C" 0.7475 0.5558 0.5075 x_fact 1.850 ic 0.500 0.500 0.500
+ 8 "N" 0.6481 0.5562 0.4730 x_fact 1.540 ic 0.000 0.000 1.000
+ 9 "C" 0.6068 0.5526 0.4995 x_fact 1.850 ic 0.500 0.500 0.500
+ 10 "C" 0.6169 0.5240 0.5432 x_fact 1.850 ic 0.500 0.500 0.500
+ 11 "O" 0.6441 0.4854 0.5453 x_fact 1.400 ic 1.000 0.000 0.000
+ 12 "C" 0.5700 0.5209 0.4728 x_fact 1.850 ic 0.500 0.500 0.500
+ 13 "O" 0.5889 0.4678 0.4617 x_fact 1.400 ic 1.000 0.000 0.000
+ 14 "C" 0.5619 0.5514 0.4275 x_fact 1.850 ic 0.500 0.500 0.500
+ 15 "N" 0.5948 0.5430 0.5777 x_fact 1.540 ic 0.000 0.000 1.000
+ 16 "C" 0.6004 0.5207 0.6231 x_fact 1.850 ic 0.500 0.500 0.500
+ 17 "C" 0.5549 0.5092 0.6409 x_fact 1.850 ic 0.500 0.500 0.500
+ 18 "O" 0.5262 0.5458 0.6363 x_fact 1.400 ic 1.000 0.000 0.000
+ 19 "C" 0.6236 0.5642 0.6532 x_fact 1.850 ic 0.500 0.500 0.500
+ 20 "S" 0.6733 0.5925 0.6308 x_fact 1.850 ic 1.000 1.000 0.000
+ 21 "N" 0.5467 0.4609 0.6610 x_fact 1.540 ic 0.000 0.000 1.000
+ 22 "C" 0.5017 0.4491 0.6769 x_fact 1.850 ic 0.500 0.500 0.500
+ 23 "C" 0.5020 0.4408 0.7272 x_fact 1.850 ic 0.500 0.500 0.500
+ 24 "O" 0.5349 0.4201 0.7461 x_fact 1.400 ic 1.000 0.000 0.000
+ 25 "C" 0.4824 0.3973 0.6528 x_fact 1.850 ic 0.500 0.500 0.500
+ 26 "S" 0.4752 0.4085 0.5938 x_fact 1.850 ic 1.000 1.000 0.000
+ 27 "N" 0.4662 0.4539 0.7485 x_fact 1.540 ic 0.000 0.000 1.000
+ 28 "C" 0.4625 0.4509 0.7966 x_fact 1.850 ic 0.500 0.500 0.500
+ 29 "C" 0.4572 0.3939 0.8164 x_fact 1.850 ic 0.500 0.500 0.500
+ 30 "O" 0.4638 0.3876 0.8567 x_fact 1.400 ic 1.000 0.000 0.000
+ 31 "C" 0.4226 0.4894 0.8077 x_fact 1.850 ic 0.500 0.500 0.500
+ 32 "C" 0.3933 0.4823 0.7669 x_fact 1.850 ic 0.500 0.500 0.500
+ 33 "C" 0.4270 0.4830 0.7284 x_fact 1.850 ic 0.500 0.500 0.500
+ 34 "N" 0.4437 0.3529 0.7894 x_fact 1.540 ic 0.000 0.000 1.000
+ 35 "C" 0.4371 0.2955 0.8055 x_fact 1.850 ic 0.500 0.500 0.500
+ 36 "C" 0.4397 0.2564 0.7658 x_fact 1.850 ic 0.500 0.500 0.500
+ 37 "O" 0.4388 0.2765 0.7272 x_fact 1.400 ic 1.000 0.000 0.000
+ 38 "C" 0.3934 0.2875 0.8293 x_fact 1.850 ic 0.500 0.500 0.500
+ 39 "O" 0.3585 0.2917 0.7973 x_fact 1.400 ic 1.000 0.000 0.000
+ 40 "N" 0.4439 0.2020 0.7750 x_fact 1.540 ic 0.000 0.000 1.000
+ 41 "C" 0.4449 0.1606 0.7384 x_fact 1.850 ic 0.500 0.500 0.500
+ 42 "C" 0.4014 0.1609 0.7134 x_fact 1.850 ic 0.500 0.500 0.500
+ 43 "O" 0.4042 0.1584 0.6715 x_fact 1.400 ic 1.000 0.000 0.000
+ 44 "C" 0.4546 0.1019 0.7605 x_fact 1.850 ic 0.500 0.500 0.500
+ 45 "C" 0.5040 0.1029 0.7734 x_fact 1.850 ic 0.500 0.500 0.500
+ 46 "C" 0.4416 0.0537 0.7288 x_fact 1.850 ic 0.500 0.500 0.500
+ 47 "C" 0.5193 0.0521 0.8010 x_fact 1.850 ic 0.500 0.500 0.500
+ 48 "N" 0.3645 0.1639 0.7351 x_fact 1.540 ic 0.000 0.000 1.000
+ 49 "C" 0.3215 0.1659 0.7117 x_fact 1.850 ic 0.500 0.500 0.500
+ 50 "C" 0.3205 0.2147 0.6787 x_fact 1.850 ic 0.500 0.500 0.500
+ 51 "O" 0.3058 0.2101 0.6416 x_fact 1.400 ic 1.000 0.000 0.000
+ 52 "C" 0.2839 0.1719 0.7457 x_fact 1.850 ic 0.500 0.500 0.500
+ 53 "C" 0.2420 0.1944 0.7254 x_fact 1.850 ic 0.500 0.500 0.500
+ 54 "C" 0.2762 0.1167 0.7699 x_fact 1.850 ic 0.500 0.500 0.500
+ 55 "N" 0.3367 0.2635 0.6947 x_fact 1.540 ic 0.000 0.000 1.000
+ 56 "C" 0.3364 0.3144 0.6661 x_fact 1.850 ic 0.500 0.500 0.500
+ 57 "C" 0.3640 0.3044 0.6252 x_fact 1.850 ic 0.500 0.500 0.500
+ 58 "O" 0.3512 0.3213 0.5885 x_fact 1.400 ic 1.000 0.000 0.000
+ 59 "C" 0.3502 0.3650 0.6930 x_fact 1.850 ic 0.500 0.500 0.500
+ 60 "N" 0.4035 0.2786 0.6304 x_fact 1.540 ic 0.000 0.000 1.000
+ 61 "C" 0.4313 0.2661 0.5916 x_fact 1.850 ic 0.500 0.500 0.500
+ 62 "C" 0.4085 0.2243 0.5597 x_fact 1.850 ic 0.500 0.500 0.500
+ 63 "O" 0.4111 0.2314 0.5190 x_fact 1.400 ic 1.000 0.000 0.000
+ 64 "C" 0.4755 0.2415 0.6071 x_fact 1.850 ic 0.500 0.500 0.500
+ 65 "C" 0.5052 0.2242 0.5688 x_fact 1.850 ic 0.500 0.500 0.500
+ 66 "C" 0.5207 0.2699 0.5387 x_fact 1.850 ic 0.500 0.500 0.500
+ 67 "N" 0.5508 0.3062 0.5650 x_fact 1.540 ic 0.000 0.000 1.000
+ 68 "C" 0.5709 0.3496 0.5453 x_fact 1.850 ic 0.500 0.500 0.500
+ 69 "N" 0.5637 0.3631 0.5026 x_fact 1.540 ic 0.000 0.000 1.000
+ 70 "N" 0.5985 0.3794 0.5705 x_fact 1.540 ic 0.000 0.000 1.000
+ 71 "N" 0.3884 0.1815 0.5786 x_fact 1.540 ic 0.000 0.000 1.000
+ 72 "C" 0.3659 0.1398 0.5493 x_fact 1.850 ic 0.500 0.500 0.500
+ 73 "C" 0.3294 0.1702 0.5230 x_fact 1.850 ic 0.500 0.500 0.500
+ 74 "O" 0.3238 0.1578 0.4826 x_fact 1.400 ic 1.000 0.000 0.000
+ 75 "C" 0.3466 0.0929 0.5770 x_fact 1.850 ic 0.500 0.500 0.500
+ 76 "O" 0.3820 0.0622 0.5974 x_fact 1.400 ic 1.000 0.000 0.000
+ 77 "N" 0.3053 0.2065 0.5454 x_fact 1.540 ic 0.000 0.000 1.000
+ 78 "C" 0.2692 0.2379 0.5223 x_fact 1.850 ic 0.500 0.500 0.500
+ 79 "C" 0.2876 0.2762 0.4871 x_fact 1.850 ic 0.500 0.500 0.500
+ 80 "O" 0.2689 0.2825 0.4515 x_fact 1.400 ic 1.000 0.000 0.000
+ 81 "C" 0.2403 0.2690 0.5554 x_fact 1.850 ic 0.500 0.500 0.500
+ 82 "C" 0.2121 0.2296 0.5841 x_fact 1.850 ic 0.500 0.500 0.500
+ 83 "O" 0.2044 0.1828 0.5693 x_fact 1.400 ic 1.000 0.000 0.000
+ 84 "N" 0.1987 0.2511 0.6225 x_fact 1.540 ic 0.000 0.000 1.000
+ 85 "N" 0.3253 0.3033 0.4976 x_fact 1.540 ic 0.000 0.000 1.000
+ 86 "C" 0.3473 0.3392 0.4660 x_fact 1.850 ic 0.500 0.500 0.500
+ 87 "C" 0.3595 0.3066 0.4243 x_fact 1.850 ic 0.500 0.500 0.500
+ 88 "O" 0.3540 0.3272 0.3862 x_fact 1.400 ic 1.000 0.000 0.000
+ 89 "C" 0.3883 0.3657 0.4892 x_fact 1.850 ic 0.500 0.500 0.500
+ 90 "C" 0.4113 0.4079 0.4603 x_fact 1.850 ic 0.500 0.500 0.500
+ 91 "C" 0.4447 0.3904 0.4319 x_fact 1.850 ic 0.500 0.500 0.500
+ 92 "C" 0.3997 0.4650 0.4636 x_fact 1.850 ic 0.500 0.500 0.500
+ 93 "C" 0.4662 0.4302 0.4042 x_fact 1.850 ic 0.500 0.500 0.500
+ 94 "C" 0.4208 0.5030 0.4357 x_fact 1.850 ic 0.500 0.500 0.500
+ 95 "C" 0.4524 0.4847 0.4075 x_fact 1.850 ic 0.500 0.500 0.500
+ 96 "N" 0.3790 0.2569 0.4306 x_fact 1.540 ic 0.000 0.000 1.000
+ 97 "C" 0.3932 0.2242 0.3908 x_fact 1.850 ic 0.500 0.500 0.500
+ 98 "C" 0.3534 0.2077 0.3618 x_fact 1.850 ic 0.500 0.500 0.500
+ 99 "O" 0.3574 0.2049 0.3208 x_fact 1.400 ic 1.000 0.000 0.000
+ 100 "C" 0.4198 0.1740 0.4057 x_fact 1.850 ic 0.500 0.500 0.500
+ 101 "C" 0.4660 0.1929 0.4220 x_fact 1.850 ic 0.500 0.500 0.500
+ 102 "O" 0.4810 0.2363 0.4085 x_fact 1.400 ic 1.000 0.000 0.000
+ 103 "N" 0.4845 0.1553 0.4489 x_fact 1.540 ic 0.000 0.000 1.000
+ 104 "N" 0.3166 0.1959 0.3835 x_fact 1.540 ic 0.000 0.000 1.000
+ 105 "C" 0.2769 0.1821 0.3560 x_fact 1.850 ic 0.500 0.500 0.500
+ 106 "C" 0.2611 0.2353 0.3314 x_fact 1.850 ic 0.500 0.500 0.500
+ 107 "O" 0.2496 0.2331 0.2918 x_fact 1.400 ic 1.000 0.000 0.000
+ 108 "C" 0.2414 0.1552 0.3847 x_fact 1.850 ic 0.500 0.500 0.500
+ 109 "C" 0.1984 0.1499 0.3581 x_fact 1.850 ic 0.500 0.500 0.500
+ 110 "C" 0.2570 0.0959 0.3979 x_fact 1.850 ic 0.500 0.500 0.500
+ 111 "N" 0.2619 0.2818 0.3553 x_fact 1.540 ic 0.000 0.000 1.000
+ 112 "C" 0.2477 0.3361 0.3355 x_fact 1.850 ic 0.500 0.500 0.500
+ 113 "C" 0.2738 0.3491 0.2944 x_fact 1.850 ic 0.500 0.500 0.500
+ 114 "O" 0.2579 0.3721 0.2615 x_fact 1.400 ic 1.000 0.000 0.000
+ 115 "C" 0.2526 0.3814 0.3725 x_fact 1.850 ic 0.500 0.500 0.500
+ 116 "S" 0.2368 0.4501 0.3529 x_fact 1.850 ic 1.000 1.000 0.000
+ 117 "N" 0.3168 0.3337 0.2948 x_fact 1.540 ic 0.000 0.000 1.000
+ 118 "C" 0.3461 0.3446 0.2578 x_fact 1.850 ic 0.500 0.500 0.500
+ 119 "C" 0.3410 0.3058 0.2181 x_fact 1.850 ic 0.500 0.500 0.500
+ 120 "O" 0.3570 0.3201 0.1817 x_fact 1.400 ic 1.000 0.000 0.000
+ 121 "C" 0.3944 0.3454 0.2738 x_fact 1.850 ic 0.500 0.500 0.500
+ 122 "C" 0.4058 0.3946 0.3050 x_fact 1.850 ic 0.500 0.500 0.500
+ 123 "C" 0.4134 0.4473 0.2777 x_fact 1.850 ic 0.500 0.500 0.500
+ 124 "N" 0.4547 0.4435 0.2538 x_fact 1.540 ic 0.000 0.000 1.000
+ 125 "C" 0.4654 0.4717 0.2174 x_fact 1.850 ic 0.500 0.500 0.500
+ 126 "N" 0.4366 0.5058 0.1974 x_fact 1.540 ic 0.000 0.000 1.000
+ 127 "N" 0.5066 0.4699 0.2018 x_fact 1.540 ic 0.000 0.000 1.000
+ 128 "N" 0.3185 0.2578 0.2250 x_fact 1.540 ic 0.000 0.000 1.000
+ 129 "C" 0.3146 0.2169 0.1877 x_fact 1.850 ic 0.500 0.500 0.500
+ 130 "C" 0.2971 0.2412 0.1447 x_fact 1.850 ic 0.500 0.500 0.500
+ 131 "O" 0.3164 0.2305 0.1093 x_fact 1.400 ic 1.000 0.000 0.000
+ 132 "C" 0.2905 0.1648 0.2031 x_fact 1.850 ic 0.500 0.500 0.500
+ 133 "C" 0.3155 0.1228 0.2320 x_fact 1.850 ic 0.500 0.500 0.500
+ 134 "C" 0.2810 0.0777 0.2439 x_fact 1.850 ic 0.500 0.500 0.500
+ 135 "C" 0.3538 0.0990 0.2062 x_fact 1.850 ic 0.500 0.500 0.500
+ 136 "N" 0.2621 0.2738 0.1473 x_fact 1.540 ic 0.000 0.000 1.000
+ 137 "C" 0.2445 0.2981 0.1056 x_fact 1.850 ic 0.500 0.500 0.500
+ 138 "C" 0.2701 0.3467 0.0882 x_fact 1.850 ic 0.500 0.500 0.500
+ 139 "O" 0.2598 0.3678 0.0516 x_fact 1.400 ic 1.000 0.000 0.000
+ 140 "C" 0.1975 0.3144 0.1164 x_fact 1.850 ic 0.500 0.500 0.500
+ 141 "C" 0.1931 0.3114 0.1656 x_fact 1.850 ic 0.500 0.500 0.500
+ 142 "C" 0.2323 0.2799 0.1850 x_fact 1.850 ic 0.500 0.500 0.500
+ 143 "N" 0.3025 0.3679 0.1135 x_fact 1.540 ic 0.000 0.000 1.000
+ 144 "C" 0.3288 0.4157 0.0982 x_fact 1.850 ic 0.500 0.500 0.500
+ 145 "C" 0.3170 0.4696 0.1228 x_fact 1.850 ic 0.500 0.500 0.500
+ 146 "O" 0.3343 0.5125 0.1079 x_fact 1.400 ic 1.000 0.000 0.000
+ 147 "N" 0.2900 0.4678 0.1566 x_fact 1.540 ic 0.000 0.000 1.000
+ 148 "C" 0.2764 0.5166 0.1815 x_fact 1.850 ic 0.500 0.500 0.500
+ 149 "C" 0.3174 0.5496 0.1971 x_fact 1.850 ic 0.500 0.500 0.500
+ 150 "O" 0.3478 0.5229 0.2143 x_fact 1.400 ic 1.000 0.000 0.000
+ 151 "C" 0.2511 0.4991 0.2242 x_fact 1.850 ic 0.500 0.500 0.500
+ 152 "O" 0.2202 0.4555 0.2110 x_fact 1.400 ic 1.000 0.000 0.000
+ 153 "C" 0.2271 0.5475 0.2466 x_fact 1.850 ic 0.500 0.500 0.500
+ 154 "N" 0.3159 0.6040 0.1926 x_fact 1.540 ic 0.000 0.000 1.000
+ 155 "C" 0.3543 0.6379 0.2086 x_fact 1.850 ic 0.500 0.500 0.500
+ 156 "C" 0.3627 0.6262 0.2575 x_fact 1.850 ic 0.500 0.500 0.500
+ 157 "O" 0.3327 0.6191 0.2854 x_fact 1.400 ic 1.000 0.000 0.000
+ 158 "C" 0.3398 0.6987 0.2012 x_fact 1.850 ic 0.500 0.500 0.500
+ 159 "C" 0.3062 0.6956 0.1655 x_fact 1.850 ic 0.500 0.500 0.500
+ 160 "C" 0.2829 0.6401 0.1716 x_fact 1.850 ic 0.500 0.500 0.500
+ 161 "N" 0.4061 0.6289 0.2675 x_fact 1.540 ic 0.000 0.000 1.000
+ 162 "C" 0.4188 0.6208 0.3147 x_fact 1.850 ic 0.500 0.500 0.500
+ 163 "C" 0.3963 0.6613 0.3449 x_fact 1.850 ic 0.500 0.500 0.500
+ 164 "O" 0.3835 0.6450 0.3825 x_fact 1.400 ic 1.000 0.000 0.000
+ 165 "C" 0.4690 0.6283 0.3201 x_fact 1.850 ic 0.500 0.500 0.500
+ 166 "C" 0.4950 0.5786 0.3002 x_fact 1.850 ic 0.500 0.500 0.500
+ 167 "C" 0.5441 0.5818 0.3111 x_fact 1.850 ic 0.500 0.500 0.500
+ 168 "O" 0.5597 0.6259 0.3207 x_fact 1.400 ic 1.000 0.000 0.000
+ 169 "O" 0.5637 0.5359 0.3078 x_fact 1.400 ic 1.000 0.000 0.000
+ 170 "N" 0.3893 0.7139 0.3302 x_fact 1.540 ic 0.000 0.000 1.000
+ 171 "C" 0.3697 0.7550 0.3617 x_fact 1.850 ic 0.500 0.500 0.500
+ 172 "C" 0.3238 0.7390 0.3762 x_fact 1.850 ic 0.500 0.500 0.500
+ 173 "O" 0.3096 0.7487 0.4142 x_fact 1.400 ic 1.000 0.000 0.000
+ 174 "C" 0.3694 0.8126 0.3395 x_fact 1.850 ic 0.500 0.500 0.500
+ 175 "N" 0.2987 0.7133 0.3448 x_fact 1.540 ic 0.000 0.000 1.000
+ 176 "C" 0.2538 0.6956 0.3565 x_fact 1.850 ic 0.500 0.500 0.500
+ 177 "C" 0.2541 0.6434 0.3860 x_fact 1.850 ic 0.500 0.500 0.500
+ 178 "O" 0.2289 0.6383 0.4169 x_fact 1.400 ic 1.000 0.000 0.000
+ 179 "C" 0.2252 0.6849 0.3134 x_fact 1.850 ic 0.500 0.500 0.500
+ 180 "C" 0.2125 0.7437 0.2938 x_fact 1.850 ic 0.500 0.500 0.500
+ 181 "C" 0.1827 0.6525 0.3250 x_fact 1.850 ic 0.500 0.500 0.500
+ 182 "C" 0.1778 0.7735 0.3232 x_fact 1.850 ic 0.500 0.500 0.500
+ 183 "N" 0.2851 0.6067 0.3749 x_fact 1.540 ic 0.000 0.000 1.000
+ 184 "C" 0.2899 0.5559 0.4040 x_fact 1.850 ic 0.500 0.500 0.500
+ 185 "C" 0.3048 0.5724 0.4508 x_fact 1.850 ic 0.500 0.500 0.500
+ 186 "O" 0.2915 0.5435 0.4824 x_fact 1.400 ic 1.000 0.000 0.000
+ 187 "C" 0.3180 0.5129 0.3825 x_fact 1.850 ic 0.500 0.500 0.500
+ 188 "S" 0.2955 0.4826 0.3321 x_fact 1.850 ic 1.000 1.000 0.000
+ 189 "N" 0.3302 0.6170 0.4540 x_fact 1.540 ic 0.000 0.000 1.000
+ 190 "C" 0.3456 0.6374 0.4982 x_fact 1.850 ic 0.500 0.500 0.500
+ 191 "C" 0.3069 0.6544 0.5266 x_fact 1.850 ic 0.500 0.500 0.500
+ 192 "O" 0.3014 0.6341 0.5646 x_fact 1.400 ic 1.000 0.000 0.000
+ 193 "C" 0.3784 0.6840 0.4917 x_fact 1.850 ic 0.500 0.500 0.500
+ 194 "N" 0.2784 0.6917 0.5093 x_fact 1.540 ic 0.000 0.000 1.000
+ 195 "C" 0.2412 0.7093 0.5370 x_fact 1.850 ic 0.500 0.500 0.500
+ 196 "C" 0.2079 0.6637 0.5450 x_fact 1.850 ic 0.500 0.500 0.500
+ 197 "O" 0.1841 0.6629 0.5793 x_fact 1.400 ic 1.000 0.000 0.000
+ 198 "C" 0.2181 0.7634 0.5177 x_fact 1.850 ic 0.500 0.500 0.500
+ 199 "O" 0.2076 0.7510 0.4718 x_fact 1.400 ic 1.000 0.000 0.000
+ 200 "C" 0.2485 0.8144 0.5206 x_fact 1.850 ic 0.500 0.500 0.500
+ 201 "N" 0.2061 0.6244 0.5143 x_fact 1.540 ic 0.000 0.000 1.000
+ 202 "C" 0.1765 0.5766 0.5192 x_fact 1.850 ic 0.500 0.500 0.500
+ 203 "C" 0.1899 0.5382 0.5577 x_fact 1.850 ic 0.500 0.500 0.500
+ 204 "O" 0.1624 0.5176 0.5819 x_fact 1.400 ic 1.000 0.000 0.000
+ 205 "C" 0.1778 0.5426 0.4749 x_fact 1.850 ic 0.500 0.500 0.500
+ 206 "C" 0.1464 0.4931 0.4759 x_fact 1.850 ic 0.500 0.500 0.500
+ 207 "C" 0.1024 0.5053 0.4856 x_fact 1.850 ic 0.500 0.500 0.500
+ 208 "C" 0.1593 0.4390 0.4675 x_fact 1.850 ic 0.500 0.500 0.500
+ 209 "C" 0.0713 0.4632 0.4865 x_fact 1.850 ic 0.500 0.500 0.500
+ 210 "C" 0.1269 0.3954 0.4693 x_fact 1.850 ic 0.500 0.500 0.500
+ 211 "C" 0.0850 0.4090 0.4785 x_fact 1.850 ic 0.500 0.500 0.500
+ 212 "O" 0.0516 0.3683 0.4794 x_fact 1.400 ic 1.000 0.000 0.000
+ 213 "N" 0.2340 0.5323 0.5636 x_fact 1.540 ic 0.000 0.000 1.000
+ 214 "C" 0.2509 0.4910 0.5953 x_fact 1.850 ic 0.500 0.500 0.500
+ 215 "C" 0.2712 0.5123 0.6379 x_fact 1.850 ic 0.500 0.500 0.500
+ 216 "O" 0.2764 0.4793 0.6696 x_fact 1.400 ic 1.000 0.000 0.000
+ 217 "C" 0.2865 0.4537 0.5713 x_fact 1.850 ic 0.500 0.500 0.500
+ 218 "O" 0.3209 0.4924 0.5580 x_fact 1.400 ic 1.000 0.000 0.000
+ 219 "C" 0.2674 0.4212 0.5318 x_fact 1.850 ic 0.500 0.500 0.500
+ 220 "N" 0.2836 0.5649 0.6382 x_fact 1.540 ic 0.000 0.000 1.000
+ 221 "C" 0.3093 0.5887 0.6754 x_fact 1.850 ic 0.500 0.500 0.500
+ 222 "C" 0.3579 0.5849 0.6670 x_fact 1.850 ic 0.500 0.500 0.500
+ 223 "O" 0.3835 0.6060 0.6951 x_fact 1.400 ic 1.000 0.000 0.000
+ 224 "N" 0.3728 0.5593 0.6300 x_fact 1.540 ic 0.000 0.000 1.000
+ 225 "C" 0.4196 0.5619 0.6181 x_fact 1.850 ic 0.500 0.500 0.500
+ 226 "C" 0.4314 0.6224 0.6039 x_fact 1.850 ic 0.500 0.500 0.500
+ 227 "O" 0.4014 0.6562 0.5951 x_fact 1.400 ic 1.000 0.000 0.000
+ 228 "C" 0.4316 0.5199 0.5814 x_fact 1.850 ic 0.500 0.500 0.500
+ 229 "S" 0.4167 0.4489 0.5931 x_fact 1.850 ic 1.000 1.000 0.000
+ 230 "N" 0.4738 0.6336 0.6028 x_fact 1.540 ic 0.000 0.000 1.000
+ 231 "C" 0.4897 0.6900 0.5911 x_fact 1.850 ic 0.500 0.500 0.500
+ 232 "C" 0.5247 0.6858 0.5553 x_fact 1.850 ic 0.500 0.500 0.500
+ 233 "O" 0.5451 0.6409 0.5490 x_fact 1.400 ic 1.000 0.000 0.000
+ 234 "C" 0.5065 0.7223 0.6330 x_fact 1.850 ic 0.500 0.500 0.500
+ 235 "C" 0.5480 0.6918 0.6525 x_fact 1.850 ic 0.500 0.500 0.500
+ 236 "C" 0.4702 0.7286 0.6680 x_fact 1.850 ic 0.500 0.500 0.500
+ 237 "C" 0.5701 0.7282 0.6894 x_fact 1.850 ic 0.500 0.500 0.500
+ 238 "N" 0.5293 0.7323 0.5319 x_fact 1.540 ic 0.000 0.000 1.000
+ 239 "C" 0.5642 0.7366 0.4986 x_fact 1.850 ic 0.500 0.500 0.500
+ 240 "C" 0.5981 0.7801 0.5159 x_fact 1.850 ic 0.500 0.500 0.500
+ 241 "O" 0.5843 0.8255 0.5288 x_fact 1.400 ic 1.000 0.000 0.000
+ 242 "C" 0.5456 0.7568 0.4536 x_fact 1.850 ic 0.500 0.500 0.500
+ 243 "C" 0.5105 0.7141 0.4364 x_fact 1.850 ic 0.500 0.500 0.500
+ 244 "C" 0.5831 0.7633 0.4186 x_fact 1.850 ic 0.500 0.500 0.500
+ 245 "C" 0.4855 0.7427 0.3957 x_fact 1.850 ic 0.500 0.500 0.500
+ 246 "N" 0.6396 0.7623 0.5152 x_fact 1.540 ic 0.000 0.000 1.000
+ 247 "C" 0.6748 0.8025 0.5286 x_fact 1.850 ic 0.500 0.500 0.500
+ 248 "C" 0.7070 0.8065 0.4914 x_fact 1.850 ic 0.500 0.500 0.500
+ 249 "O" 0.7130 0.7693 0.4632 x_fact 1.400 ic 1.000 0.000 0.000
+ 250 "C" 0.6975 0.7833 0.5733 x_fact 1.850 ic 0.500 0.500 0.500
+ 251 "C" 0.7216 0.7272 0.5661 x_fact 1.850 ic 0.500 0.500 0.500
+ 252 "C" 0.6637 0.7824 0.6114 x_fact 1.850 ic 0.500 0.500 0.500
+ 253 "C" 0.7524 0.7086 0.6043 x_fact 1.850 ic 0.500 0.500 0.500
+ 254 "N" 0.7316 0.8532 0.4909 x_fact 1.540 ic 0.000 0.000 1.000
+ 255 "C" 0.7633 0.8613 0.4555 x_fact 1.850 ic 0.500 0.500 0.500
+ 256 "C" 0.8056 0.8271 0.4625 x_fact 1.850 ic 0.500 0.500 0.500
+ 257 "O" 0.8275 0.8145 0.4292 x_fact 1.400 ic 1.000 0.000 0.000
+ 258 "C" 0.7735 0.9240 0.4570 x_fact 1.850 ic 0.500 0.500 0.500
+ 259 "C" 0.7504 0.9479 0.4943 x_fact 1.850 ic 0.500 0.500 0.500
+ 260 "C" 0.7219 0.9046 0.5172 x_fact 1.850 ic 0.500 0.500 0.500
+ 261 "N" 0.8136 0.8140 0.5046 x_fact 1.540 ic 0.000 0.000 1.000
+ 262 "C" 0.8556 0.7822 0.5144 x_fact 1.850 ic 0.500 0.500 0.500
+ 263 "C" 0.8455 0.7200 0.5115 x_fact 1.850 ic 0.500 0.500 0.500
+ 264 "O" 0.8126 0.7010 0.4933 x_fact 1.400 ic 1.000 0.000 0.000
+ 265 "N" 0.8754 0.6875 0.5317 x_fact 1.540 ic 0.000 0.000 1.000
+ 266 "C" 0.8742 0.6266 0.5312 x_fact 1.850 ic 0.500 0.500 0.500
+ 267 "C" 0.8717 0.6010 0.5770 x_fact 1.850 ic 0.500 0.500 0.500
+ 268 "O" 0.8693 0.5491 0.5782 x_fact 1.400 ic 1.000 0.000 0.000
+ 269 "C" 0.9144 0.6039 0.5065 x_fact 1.850 ic 0.500 0.500 0.500
+ 270 "N" 0.8701 0.6346 0.6115 x_fact 1.540 ic 0.000 0.000 1.000
+ 271 "C" 0.8714 0.6128 0.6571 x_fact 1.850 ic 0.500 0.500 0.500
+ 272 "C" 0.8282 0.6245 0.6807 x_fact 1.850 ic 0.500 0.500 0.500
+ 273 "O" 0.8198 0.6714 0.6949 x_fact 1.400 ic 1.000 0.000 0.000
+ 274 "C" 0.9106 0.6416 0.6832 x_fact 1.850 ic 0.500 0.500 0.500
+ 275 "O" 0.9484 0.6332 0.6537 x_fact 1.400 ic 1.000 0.000 0.000
+ 276 "C" 0.9174 0.6138 0.7286 x_fact 1.850 ic 0.500 0.500 0.500
+ 277 "N" 0.8024 0.5793 0.6848 x_fact 1.540 ic 0.000 0.000 1.000
+ 278 "C" 0.7591 0.5877 0.7066 x_fact 1.850 ic 0.500 0.500 0.500
+ 279 "C" 0.7650 0.5936 0.7559 x_fact 1.850 ic 0.500 0.500 0.500
+ 280 "O" 0.7928 0.5629 0.7750 x_fact 1.400 ic 1.000 0.000 0.000
+ 281 "C" 0.7289 0.5379 0.6965 x_fact 1.850 ic 0.500 0.500 0.500
+ 282 "S" 0.7164 0.5300 0.6381 x_fact 1.850 ic 1.000 1.000 0.000
+ 283 "N" 0.7386 0.6276 0.7772 x_fact 1.540 ic 0.000 0.000 1.000
+ 284 "C" 0.7400 0.6341 0.8254 x_fact 1.850 ic 0.500 0.500 0.500
+ 285 "C" 0.7227 0.5833 0.8492 x_fact 1.850 ic 0.500 0.500 0.500
+ 286 "O" 0.6985 0.5483 0.8306 x_fact 1.400 ic 1.000 0.000 0.000
+ 287 "C" 0.7123 0.6858 0.8343 x_fact 1.850 ic 0.500 0.500 0.500
+ 288 "C" 0.6803 0.6870 0.7962 x_fact 1.850 ic 0.500 0.500 0.500
+ 289 "C" 0.7052 0.6645 0.7557 x_fact 1.850 ic 0.500 0.500 0.500
+ 290 "N" 0.7336 0.5799 0.8920 x_fact 1.540 ic 0.000 0.000 1.000
+ 291 "C" 0.7208 0.5311 0.9189 x_fact 1.850 ic 0.500 0.500 0.500
+ 292 "C" 0.6730 0.5200 0.9248 x_fact 1.850 ic 0.500 0.500 0.500
+ 293 "O" 0.6585 0.4725 0.9346 x_fact 1.400 ic 1.000 0.000 0.000
+ 294 "N" 0.6455 0.5642 0.9196 x_fact 1.540 ic 0.000 0.000 1.000
+ 295 "C" 0.5973 0.5569 0.9236 x_fact 1.850 ic 0.500 0.500 0.500
+ 296 "C" 0.5767 0.5425 0.8783 x_fact 1.850 ic 0.500 0.500 0.500
+ 297 "O" 0.5369 0.5346 0.8769 x_fact 1.400 ic 1.000 0.000 0.000
+ 298 "C" 0.5766 0.6055 0.9484 x_fact 1.850 ic 0.500 0.500 0.500
+ 299 "C" 0.5834 0.6622 0.9277 x_fact 1.850 ic 0.500 0.500 0.500
+ 300 "O" 0.6151 0.6709 0.9029 x_fact 1.400 ic 1.000 0.000 0.000
+ 301 "O" 0.5548 0.6985 0.9379 x_fact 1.400 ic 1.000 0.000 0.000
+ 302 "N" 0.6026 0.5402 0.8435 x_fact 1.540 ic 0.000 0.000 1.000
+ 303 "C" 0.5872 0.5223 0.7990 x_fact 1.850 ic 0.500 0.500 0.500
+ 304 "C" 0.6206 0.4781 0.7833 x_fact 1.850 ic 0.500 0.500 0.500
+ 305 "O" 0.6420 0.4854 0.7487 x_fact 1.400 ic 1.000 0.000 0.000
+ 306 "C" 0.5853 0.5711 0.7654 x_fact 1.850 ic 0.500 0.500 0.500
+ 307 "C" 0.5461 0.6089 0.7763 x_fact 1.850 ic 0.500 0.500 0.500
+ 308 "C" 0.5500 0.6521 0.8073 x_fact 1.850 ic 0.500 0.500 0.500
+ 309 "C" 0.5059 0.6005 0.7551 x_fact 1.850 ic 0.500 0.500 0.500
+ 310 "C" 0.5148 0.6864 0.8165 x_fact 1.850 ic 0.500 0.500 0.500
+ 311 "C" 0.4699 0.6345 0.7646 x_fact 1.850 ic 0.500 0.500 0.500
+ 312 "C" 0.4741 0.6773 0.7961 x_fact 1.850 ic 0.500 0.500 0.500
+ 313 "O" 0.4393 0.7111 0.8052 x_fact 1.400 ic 1.000 0.000 0.000
+ 314 "N" 0.6228 0.4344 0.8102 x_fact 1.540 ic 0.000 0.000 1.000
+ 315 "C" 0.6589 0.3938 0.8044 x_fact 1.850 ic 0.500 0.500 0.500
+ 316 "C" 0.6499 0.3465 0.7723 x_fact 1.850 ic 0.500 0.500 0.500
+ 317 "O" 0.6801 0.3119 0.7643 x_fact 1.400 ic 1.000 0.000 0.000
+ 318 "C" 0.6666 0.3700 0.8521 x_fact 1.850 ic 0.500 0.500 0.500
+ 319 "N" 0.6104 0.3451 0.7543 x_fact 1.540 ic 0.000 0.000 1.000
+ 320 "C" 0.5956 0.2989 0.7258 x_fact 1.850 ic 0.500 0.500 0.500
+ 321 "C" 0.5890 0.3180 0.6786 x_fact 1.850 ic 0.500 0.500 0.500
+ 322 "O" 0.6028 0.3629 0.6643 x_fact 1.400 ic 1.000 0.000 0.000
+ 323 "C" 0.5548 0.2727 0.7465 x_fact 1.850 ic 0.500 0.500 0.500
+ 324 "C" 0.5637 0.2534 0.7937 x_fact 1.850 ic 0.500 0.500 0.500
+ 325 "O" 0.5454 0.2761 0.8257 x_fact 1.400 ic 1.000 0.000 0.000
+ 326 "N" 0.5922 0.2114 0.7967 x_fact 1.540 ic 0.000 0.000 1.000
+ 327 "O" 0.5691 0.2813 0.6550 x_fact 1.400 ic 1.000 0.000 0.000
+*Arcs
+*Edges
+ 1 2 1 c 0.700 0.700 0.700
+ 2 3 1
+ 2 5 1
+ 3 4 1
+ 3 8 1
+ 5 6 1
+ 5 7 1
+ 8 9 1
+ 9 10 1
+ 9 12 1
+ 10 11 1
+ 10 15 1
+ 12 13 1
+ 12 14 1
+ 15 16 1
+ 16 17 1
+ 16 19 1
+ 17 18 1
+ 17 21 1
+ 19 20 1
+ 20 282 1
+ 21 22 1
+ 22 23 1
+ 22 25 1
+ 23 24 1
+ 23 27 1
+ 25 26 1
+ 26 229 1
+ 27 28 1
+ 27 33 1
+ 28 29 1
+ 28 31 1
+ 29 30 1
+ 29 34 1
+ 31 32 1
+ 32 33 1
+ 34 35 1
+ 35 36 1
+ 35 38 1
+ 36 37 1
+ 36 40 1
+ 38 39 1
+ 40 41 1
+ 41 42 1
+ 41 44 1
+ 42 43 1
+ 42 48 1
+ 44 45 1
+ 44 46 1
+ 45 47 1
+ 48 49 1
+ 49 50 1
+ 49 52 1
+ 50 51 1
+ 50 55 1
+ 52 53 1
+ 52 54 1
+ 55 56 1
+ 56 57 1
+ 56 59 1
+ 57 58 1
+ 57 60 1
+ 60 61 1
+ 61 62 1
+ 61 64 1
+ 62 63 1
+ 62 71 1
+ 64 65 1
+ 65 66 1
+ 66 67 1
+ 67 68 1
+ 68 69 1
+ 68 70 1
+ 71 72 1
+ 72 73 1
+ 72 75 1
+ 73 74 1
+ 73 77 1
+ 75 76 1
+ 77 78 1
+ 78 79 1
+ 78 81 1
+ 79 80 1
+ 79 85 1
+ 81 82 1
+ 82 83 1
+ 82 84 1
+ 85 86 1
+ 86 87 1
+ 86 89 1
+ 87 88 1
+ 87 96 1
+ 89 90 1
+ 90 91 1
+ 90 92 1
+ 91 93 1
+ 92 94 1
+ 93 95 1
+ 94 95 1
+ 96 97 1
+ 97 98 1
+ 97 100 1
+ 98 99 1
+ 98 104 1
+ 100 101 1
+ 101 102 1
+ 101 1...
[truncated message content] |
|
From: <mwl...@us...> - 2007-08-22 18:29:00
|
Revision: 495
http://cishell.svn.sourceforge.net/cishell/?rev=495&view=rev
Author: mwlinnem
Date: 2007-08-22 11:28:57 -0700 (Wed, 22 Aug 2007)
Log Message:
-----------
Removed unused code.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/AllConvsReport.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/AllTestsReport.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ConvReport.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/FilePassReport.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ReadMeReport.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/Report.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/TestReport.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -126,13 +126,11 @@
// convReportsList.add(convReport);
// }
-// String summary = "%" + avgChanceCorrect * 100 + " Correct";
- String summary = "";
ConvReport[] convReports =
(ConvReport[]) convReportsList.toArray(new ConvReport[0]);
this.allConvsReport =
new AllConvsReport(reportFile, convReports,
- "All Converters Report", summary);
+ "All Converters Report");
report.flush();
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -90,9 +90,8 @@
TestReport[] testReports = (TestReport[]) testReportsList
.toArray(new TestReport[0]);
- String summary = "";
this.convReport = new ConvReport(reportFile, new TestReport[0], cr
- .getNameNoPackageWithTrust(), summary);
+ .getNameNoPackageWithTrust());
report.println("");
report.flush();
reportOutStream.close();
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -109,14 +109,11 @@
failedTRReports.add(testReport);
}
-// String summary = "%" + percentCompletelyPassed * 100 + " Completely Passed";
- String summary = "";
this.allTestsReport = new AllTestsReport(reportFile,
"All Test Reports",
(TestReport[]) passedTRReports.toArray(new TestReport[0]),
(TestReport[]) pPassedTRReports.toArray(new TestReport[0]),
- (TestReport[]) failedTRReports.toArray(new TestReport[0]),
- summary);
+ (TestReport[]) failedTRReports.toArray(new TestReport[0]));
} catch (IOException e) {
this.log.log(LogService.LOG_ERROR,
"Unable to generate all tests report.", e);
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -42,9 +42,7 @@
writeReport(report, fpr);
- String summary = "";
- this.filePassReport = new FilePassReport(reportFile, fpr.getName(),
- summary);
+ this.filePassReport = new FilePassReport(reportFile, fpr.getName());
} catch (IOException e) {
this.log.log(LogService.LOG_ERROR,
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -119,15 +119,10 @@
failedFPReports.add(filePassReport);
}
-
-// String summary = "%" + percentSuccessful + " Successful";
- String summary = "";
+ //TODO: remove file pass reports
this.testReport = new TestReport(reportFile, tr.getNameWithSuccess(),
new FilePassReport[0],
- new FilePassReport[0],
-// (FilePassReport[]) successfulFPReports.toArray(new FilePassReport[0]),
-// (FilePassReport[]) failedFPReports.toArray(new FilePassReport[0]),
- summary);
+ new FilePassReport[0]);
} catch (IOException e) {
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -21,7 +21,7 @@
"ReportREADME.txt";
File readmeFile = new File(readmePath);
- this.readme = new ReadMeReport(readmeFile, "README", "");
+ this.readme = new ReadMeReport(readmeFile, "README");
}
public ReadMeReport getReadMe() {
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/AllConvsReport.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/AllConvsReport.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/AllConvsReport.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -7,13 +7,11 @@
private File report;
private ConvReport[] convReports;
private String name;
- private String summary;
- public AllConvsReport (File report, ConvReport[] convReports, String name, String summary) {
+ public AllConvsReport (File report, ConvReport[] convReports, String name) {
this.report = report;
this.convReports = convReports;
this.name = name;
- this.summary = summary;
}
public String getName() {
return this.name;
@@ -26,9 +24,4 @@
public ConvReport[] getConverterReports() {
return this.convReports;
}
-
- public String getShortSummary() {
- return this.summary;
- }
-
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/AllTestsReport.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/AllTestsReport.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/AllTestsReport.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -11,19 +11,16 @@
private TestReport[] failedTestReports;
private String name;
- private String summary;
public AllTestsReport(File allTestsReport, String name,
TestReport[] successfulTestReports,
TestReport[] partialSuccessTestReports,
- TestReport[] failedTestReports,
- String summary) {
+ TestReport[] failedTestReports) {
this.allTestsReport = allTestsReport;
this.name = name;
this.successfulTestReports = successfulTestReports;
this.partialSuccessTestReports = partialSuccessTestReports;
this.failedTestReports = failedTestReports;
- this.summary = summary;
}
public File getAllTestsReport() {
@@ -45,8 +42,4 @@
public String getName() {
return this.name;
}
-
- public String getShortSummary() {
- return this.summary;
- }
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ConvReport.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ConvReport.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ConvReport.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -7,13 +7,11 @@
private File report;
private TestReport[] trs;
private String name;
- private String summary;
- public ConvReport (File report, TestReport[] trs, String name, String summary) {
+ public ConvReport (File report, TestReport[] trs, String name) {
this.report = report;
this.trs = trs;
this.name = name;
- this.summary = summary;
}
public String getName() {
return this.name;
@@ -26,8 +24,4 @@
public TestReport[] getTestReports() {
return this.trs;
}
-
- public String getShortSummary() {
- return this.summary;
- }
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/FilePassReport.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/FilePassReport.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/FilePassReport.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -7,12 +7,10 @@
private File filePassReport;
private String name;
- private String summary;
- public FilePassReport (File filePassReport, String name, String summary) {
+ public FilePassReport (File filePassReport, String name) {
this.filePassReport = filePassReport;
this.name = name;
- this.summary = summary;
}
public File getFilePassReport() {
@@ -22,8 +20,4 @@
public String getName() {
return this.name;
}
-
- public String getShortSummary() {
- return this.summary;
- }
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ReadMeReport.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ReadMeReport.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/ReadMeReport.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -7,20 +7,14 @@
private File file;
private String name;
- private String summary;
- public ReadMeReport(File file, String name, String summary) {
+ public ReadMeReport(File file, String name) {
this.file = file;
this.name = name;
- this.summary = summary;
}
public String getName() {
return this.name;
}
-
- public String getShortSummary() {
- return this.summary;
- }
public File getReportFile() {
return this.file;
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/Report.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/Report.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/Report.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -2,6 +2,4 @@
public interface Report {
public String getName();
-
- public String getShortSummary();
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/TestReport.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/TestReport.java 2007-08-22 18:20:40 UTC (rev 494)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/TestReport.java 2007-08-22 18:28:57 UTC (rev 495)
@@ -10,15 +10,13 @@
private FilePassReport[] failedFilePassReports;
private String name;
- private String summary;
public TestReport(File testReport, String name, FilePassReport[] successfulFilePassReports,
- FilePassReport[] failedFilePassReports, String summary) {
+ FilePassReport[] failedFilePassReports) {
this.testReport = testReport;
this.name = name;
this.successfulFilePassReports = successfulFilePassReports;
this.failedFilePassReports = failedFilePassReports;
- this.summary = summary;
}
public File getTestReport() {
@@ -36,8 +34,4 @@
public String getName() {
return this.name;
}
-
- public String getShortSummary() {
- return this.summary;
- }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-22 18:20:42
|
Revision: 494
http://cishell.svn.sourceforge.net/cishell/?rev=494&view=rev
Author: mwlinnem
Date: 2007-08-22 11:20:40 -0700 (Wed, 22 Aug 2007)
Log Message:
-----------
Tests listed in converter reports are now sorted by success then test number.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-22 17:26:12 UTC (rev 493)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-22 18:20:40 UTC (rev 494)
@@ -158,8 +158,7 @@
FilePassResult[] results = this.testRunner.runTest(testBasicData);
//return the results of the test
- String testName = "Test " + numTestsSoFar;
- return new TestResult(results, testConvs, compareConvs, testName);
+ return new TestResult(results, testConvs, compareConvs, numTestsSoFar);
}
private Data[][] wrapInData(String[] testFilePaths, String format) {
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-22 17:26:12 UTC (rev 493)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-22 18:20:40 UTC (rev 494)
@@ -94,23 +94,38 @@
report.println("Trusted Converters...");
for (int ii = 0; ii < trustedConvs.size(); ii++) {
ConvResult cr = (ConvResult) trustedConvs.get(ii);
+
+ //add this converters name to all convs report
report.println(" " + cr.getNameNoPackage());
+
+ //generate corresponding sub-report
+ this.convSubGen.generate(cr);
+ ConvReport convReport = this.convSubGen.getConvReport();
+ convReportsList.add(convReport);
}
report.println("");
report.println("Non-Trusted Converters...");
for (int ii = 0; ii < nonTrustedConvs.size(); ii++) {
ConvResult cr = (ConvResult) nonTrustedConvs.get(ii);
+
+ //add this converters name to all convs report
report.println(" " + cr.getNameNoPackage());
- }
- report.println("");
-
- for (int ii = 0; ii < convResults.length; ii++) {
- this.convSubGen.generate(convResults[ii]);
+
+ //generate corresponding sub-report
+ this.convSubGen.generate(cr);
ConvReport convReport = this.convSubGen.getConvReport();
convReportsList.add(convReport);
+
}
+ report.println("");
+// for (int ii = 0; ii < convResults.length; ii++) {
+// this.convSubGen.generate(convResults[ii]);
+// ConvReport convReport = this.convSubGen.getConvReport();
+// convReportsList.add(convReport);
+// }
+
// String summary = "%" + avgChanceCorrect * 100 + " Correct";
String summary = "";
ConvReport[] convReports =
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-22 17:26:12 UTC (rev 493)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-22 18:20:40 UTC (rev 494)
@@ -61,7 +61,7 @@
report.println("");
report.println("Involved in the following tests...");
- TestResult[] involvedTests = cr.getTests();
+ TestResult[] involvedTests = cr.getTestsBySuccess();
for (int ii = 0; ii < involvedTests.length; ii++) {
TestResult tr = involvedTests[ii];
report.println(" " + tr.getNameWithSuccess());
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java 2007-08-22 17:26:12 UTC (rev 493)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java 2007-08-22 18:20:40 UTC (rev 494)
@@ -1,10 +1,9 @@
package org.cishell.testing.convertertester.core.tester2.reportgen.results;
import java.util.ArrayList;
-import java.util.HashSet;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import java.util.Set;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.FilePassFailure;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.FilePassSuccess;
@@ -18,7 +17,7 @@
private List failFilePasses = new ArrayList();
private List successFilePasses = new ArrayList();
private List uniqueFailureExplanations = new ArrayList();
- private Set tests = new HashSet();
+ private List tests = new ArrayList();
private boolean isTrusted;
@@ -56,7 +55,9 @@
}
public void addTest(TestResult tr) {
- this.tests.add(tr);
+ if (! tests.contains(tr)) {
+ this.tests.add(tr);
+ }
}
/**
@@ -95,9 +96,15 @@
}
public TestResult[] getTests() {
+ Collections.sort(this.tests);
return (TestResult[]) this.tests.toArray(new TestResult[0]);
}
+ public TestResult[] getTestsBySuccess() {
+ Collections.sort(this.tests, TestResult.getCompareBySuccess());
+ return (TestResult[]) this.tests.toArray(new TestResult[0]);
+ }
+
public void addPass(FilePassSuccess fp) {
this.successFilePasses.add(fp);
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java 2007-08-22 17:26:12 UTC (rev 493)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java 2007-08-22 18:20:40 UTC (rev 494)
@@ -1,13 +1,14 @@
package org.cishell.testing.convertertester.core.tester2.reportgen.results;
import java.util.ArrayList;
+import java.util.Comparator;
import java.util.List;
import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
-public class TestResult {
+public class TestResult implements Comparable {
public static final String DEFAULT_NAME = "Default Test Result Name";
@@ -15,6 +16,8 @@
private List passedFPRs;
private List failedFPRs;
+ private int testNum;
+
private String format;
private String name = DEFAULT_NAME;
@@ -25,11 +28,12 @@
private boolean[] successes;
public TestResult(FilePassResult[] fprs, ConverterPath testConvs,
- ConverterPath compareConvs, String name) {
+ ConverterPath compareConvs, int testNum) {
this.fprs = fprs;
this.testConvs = testConvs;
this.compareConvs = compareConvs;
- this.name = name;
+ this.testNum = testNum;
+ this.name = "Test " + testNum;
this.successes = new boolean[fprs.length];
@@ -96,6 +100,10 @@
return this.name;
}
+ public int getTestNum() {
+ return this.testNum;
+ }
+
public String getNameWithSuccess() {
return getName() + " - " + getSummary();
}
@@ -166,8 +174,62 @@
this.cachedSuccesses = true;
}
+
+ public int compareTo(Object arg0) {
+ if ((arg0 instanceof TestResult)) {
+ TestResult otherTR = (TestResult) arg0;
+ return getTestNum() - otherTR.getTestNum();
+ } else {
+ throw new IllegalArgumentException("Must compare to another " +
+ "TestResult");
+ }
+ }
+ public static Comparator getCompareBySuccess() {
+ return new CompareBySuccess();
+ }
+ private static class CompareBySuccess implements Comparator {
+
+ /**
+ * Compare first by success, where
+ * completely successful > partially successful > complet failure,
+ * and then alphabetize (the natural order of test results)
+ * for cases where they both have the same success type.
+ */
+ public int compare(Object o1, Object o2) {
+ if (o1 instanceof TestResult && o2 instanceof TestResult) {
+ TestResult tr1 = (TestResult) o1;
+ TestResult tr2 = (TestResult) o2;
+
+ int success1 = getSuccessRating(tr1);
+ int success2 = getSuccessRating(tr2);
+
+ if (success1 != success2) {
+ return success2 - success1;
+ } else {
+ return tr1.compareTo(tr2);
+ }
+
+ } else {
+ throw new IllegalArgumentException("Can only " +
+ "compare test results");
+ }
+
+ }
+
+ private int getSuccessRating(TestResult tr) {
+ if (tr.allSucceeded()) {
+ return 2;
+ } else if (tr.someSucceeded()) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+ }
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-22 17:26:18
|
Revision: 493
http://cishell.svn.sourceforge.net/cishell/?rev=493&view=rev
Author: mwlinnem
Date: 2007-08-22 10:26:12 -0700 (Wed, 22 Aug 2007)
Log Message:
-----------
Improved graph comparer errors, and altered converter reports to have more readable /informative names.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/ComparisonResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/DefaultGraphComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/GraphUtil.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/RunningLog.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsNotPreservedComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsPreservedComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/LossyComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/SimpleGraphComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java
Added Paths:
-----------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/ComplexGraphComparer.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/util/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/util/ConvUtil.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/ComparisonResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/ComparisonResult.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/ComparisonResult.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -3,17 +3,10 @@
public class ComparisonResult {
private boolean succeeded;
- private String explanation;
private RunningLog log;
public ComparisonResult(boolean succeeded, RunningLog log) {
- this(succeeded, "", log);
- }
-
- public ComparisonResult(boolean succeeded, String explanation,
- RunningLog log) {
this.succeeded = succeeded;
- this.explanation = explanation;
this.log = log;
}
@@ -21,10 +14,6 @@
return succeeded;
}
- public String explanation() {
- return explanation;
- }
-
public String getLog() {
return log.toString();
}
@@ -33,8 +22,8 @@
if (comparisonSucceeded()) {
return "Success!";
} else {
- return "Failure: " + explanation + "\n" +
- "Log:" + "\n" +
+ return "Failure: " + "\n" +
+ "Log:" + "\n" +
log;
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/DefaultGraphComparer.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/DefaultGraphComparer.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/DefaultGraphComparer.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -24,51 +24,55 @@
log = new RunningLog();
if (g1 == null || g2 == null) {
- return new ComparisonResult(false, "At least one of the provided" +
- " graphs was null.", log);
+ log.prepend("At least one of the provided graphs was null");
+ return new ComparisonResult(false, log);
}
//basic tests
if (! isSameDirectedness(g1, g2)) {
- return new ComparisonResult(false, "Directedness not of the " +
- "same type.", log);
+ log.prepend("Directedness not of the same type");
+ return new ComparisonResult(false, log);
} else if (! isEqualNodeCount(g1, g2)) {
- return new ComparisonResult(false, "Node counts not equal.", log);
+ log.prepend("Node counts not equal.");
+ return new ComparisonResult(false, log);
} else if (! isEqualEdgeCount(g1, g2)) {
- return new ComparisonResult(false, "Edge counts not equal.", log);
+ log.prepend("Edge counts not equal.");
+ return new ComparisonResult(false, log);
}
//complex tests
if (idsPreserved) {
//tests for when graph IDs are preserved across the conversion
if (! areEqual(g1, g2, true)) {
- return new ComparisonResult(false, "Graphs do not have the " +
- "same contents.", log);
+ log.prepend("Graphs do not have the same contents.");
+ return new ComparisonResult(false, log);
}
} else {
//tests for when graph IDs are NOT preserved across the conversion
- if (! nodeDegreeFrequenciesEqual(g1, g2))
- return new ComparisonResult(false, "The number of nodes" +
- "with a certain number of edges is not the same in" +
- "both graphs.", log);
-
+ if (! nodeDegreeFrequenciesEqual(g1, g2)) {
+ log.prepend("The number of nodes with a certain number of " +
+ "edges is not the same in both graphs");
+ return new ComparisonResult(false, log);
+ }
/*
* TODO: we could really use a graph isomorphism comparison right
* here. nodeDegreeFrequencies will catch some errors, but lets
* a lot through.
*/
- if (! haveSameNodeAttributes(g1, g2))
- return new ComparisonResult(false, "Node attributes are not " +
- "the same in both graphs.", log);
+ if (! haveSameNodeAttributes(g1, g2)) {
+ log.prepend("Node attributes are not the same in both graphs");
+ return new ComparisonResult(false, log);
+ }
if (! haveSameEdgeAttributes(g1, g2))
- return new ComparisonResult(false, "Edge attributes are not " +
- "the same in both graphs.", log);
+ log.prepend("Edge attributes are not the same in both graphs");
+ return new ComparisonResult(false, log);
}
//all tests passed
- return new ComparisonResult(true, "All tests succeeded.", log);
+ log.prepend("All tests succeeded.");
+ return new ComparisonResult(true, log);
}
private boolean isSameDirectedness(Graph g1, Graph g2) {
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/GraphUtil.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/GraphUtil.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/GraphUtil.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -36,7 +36,17 @@
}
public static Table getSorted(Table t) {
- Sort tSort = new Sort(getColumnNames(t));
+ return getSortedByColumns(t, getColumnNames(t));
+ }
+
+ public static Table getSortedByColumns(Table t, String[] columnNames) {
+ for (int ii = 0; ii < columnNames.length; ii++) {
+ String columnName = columnNames[ii];
+ if (t.getColumn(columnName) == null) {
+ System.out.println("WTF, cannot find column " + columnName);
+ }
+ }
+ Sort tSort = new Sort(columnNames);
Table sortedTable = t.select(ExpressionParser.predicate("TRUE"),
tSort);
return sortedTable;
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/RunningLog.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/RunningLog.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester/graphcomparison/RunningLog.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -12,6 +12,10 @@
log += s +"\n";
}
+ public void prepend(String s) {
+ log = s + "\n" + log;
+ }
+
public String getLog() {
return log;
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -99,7 +99,8 @@
origGraph, resultGraph);
if (!graphComparisonPhaseResult.comparisonSucceeded()) {
- String explanation = graphComparisonPhaseResult.getLog();
+ String explanation =
+ graphComparisonPhaseResult.getLog();
ComparePhaseFailure failure = new ComparePhaseFailure(
originalFileData,
explanation);
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/ComplexGraphComparer.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/ComplexGraphComparer.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/ComplexGraphComparer.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -0,0 +1,184 @@
+package org.cishell.testing.convertertester.core.tester2.graphcomparison;
+
+import java.util.Iterator;
+
+import org.cishell.testing.convertertester.core.tester.graphcomparison.GraphUtil;
+import org.cishell.testing.convertertester.core.tester.graphcomparison.RunningLog;
+
+import prefuse.data.Table;
+import prefuse.data.Tuple;
+
+public abstract class ComplexGraphComparer extends SimpleGraphComparer {
+
+ private RunningLog log;
+
+ public ComplexGraphComparer () {
+
+ this.log = new RunningLog();
+ }
+
+ protected RunningLog getLog() {
+ return this.log;
+ }
+
+ protected void clearLog() {
+ this.log = new RunningLog();
+ }
+
+ protected boolean areEqualWhenSorted(Table t1, Table t2) {
+
+ if (! haveSameColumns(t1, t2)) {
+ return false;
+ }
+
+ String[] colNames = GraphUtil.getColumnNames(t1);
+
+ boolean result = areEqual(GraphUtil.getSortedByColumns(t1, colNames),
+ GraphUtil.getSortedByColumns(t2, colNames));
+ return result;
+ }
+
+ /*
+ * Cares about the order of nodes and edges as well.
+ */
+ protected boolean areEqual(Table t1, Table t2) {
+ Iterator tuplesIterator1 = t1.tuples();
+ Iterator tuplesIterator2 = t2.tuples();
+
+ while (tuplesIterator1.hasNext()) {
+ Tuple tuple1 = (Tuple) tuplesIterator1.next();
+ Tuple tuple2 = (Tuple) tuplesIterator2.next();
+
+ if (! areEqual(tuple1, tuple2)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ protected boolean areEqual(Tuple tu1, Tuple tu2) {
+ if (tu1.getColumnCount() != tu2.getColumnCount()) {
+ log.append("Number of columns in tuples differ.");
+ log.append("First tuple: " + tu1);
+ log.append("Second tuple: " + tu2);
+ return false;
+ }
+
+ for (int ii = 0; ii < tu1.getColumnCount(); ii++) {
+ Object columnContents1 = tu1.get(ii);
+
+ Object columnContents2 = null;
+ boolean foundMatchingColumn = false;
+ for (int kk = 0; kk < tu2.getColumnCount(); kk++) {
+
+ if (tu2.getColumnName(kk).equals(tu1.getColumnName(ii))) {
+ columnContents2 = tu2.get(kk);
+ foundMatchingColumn = true;
+ break;
+ }
+ }
+
+ //TODO: Possibly remove this, since it SHOULD be guaranteed
+ //not to happen by a check run before this algorithm
+ if (! foundMatchingColumn) {
+ log.append("Only one graph has the column " +
+ tu1.getColumnName(ii));
+
+ log.append("example tuples: ");
+ log.append(tu1.toString() + " : " + tu2.toString());
+ return false;
+ }
+
+ String columnName = tu1.getColumnName(ii);
+
+ if (columnContents1 == null && columnContents2 == null) {
+ //nulls are equal to each other!
+ continue;
+ } else if (columnContents1 == null) {
+ log.append("Column contents not equal!");
+ log.append("For the column " + columnName + "," +
+ "field in first tuple is null while " +
+ "the other is " + columnContents2.toString());
+ log.append(tu1 + " : " + tu2);
+ return false;
+ } else if (columnContents2 == null) {
+ log.append("Column contents not equal!");
+ log.append("For the column " + columnName + "," +
+ "field in first tuple is " +
+ columnContents1.toString() + ", while " +
+ "the other is null");
+ log.append(tu1 + " : " + tu2);
+ return false;
+ } else if (! columnContents1.equals(columnContents2)){
+ log.append("Column contents not equal!");
+ log.append("For the column " + columnName + "," +
+ "field in first tuple is " +
+ columnContents1.toString() + ", while " +
+ "the other is " + columnContents2.toString());
+ String contents1Class = columnContents1.getClass().toString();
+ String contents2Class = columnContents2.getClass().toString();
+ log.append("Field 1 class: " + contents1Class);
+ log.append("Field 2 class: " + contents2Class);
+ log.append(tu1 + " : " + tu2);
+ //neither are null, but they are still not equal.
+ return false;
+ }
+ }
+
+ //all column contents are equal.
+ return true;
+ }
+
+ protected boolean haveSameColumns(Table t1, Table t2) {
+ return firstHasColumnsOfSecond(t2, t1) &&
+ firstHasColumnsOfSecond(t1, t2);
+ }
+
+ protected boolean firstHasColumnsOfSecond(Table t1, Table t2) {
+
+ for (int ii = 0; ii < t2.getColumnCount(); ii++) {
+ String t2Name = t2.getColumnName(ii);
+
+ boolean foundMatch = false;
+ for (int kk = 0; kk < t1.getColumnCount(); kk++) {
+ String t1Name = t1.getColumnName(kk);
+
+ if (t2Name.equals(t1Name)) {
+ foundMatch = true;
+ break;
+ }
+ }
+
+ if (! foundMatch) {
+ log.append("Tables do not have the same columns");
+ log.append("One table has the column '" +
+ t2.getColumnName(ii) + "', while the other does " +
+ "not.");
+
+ String[] t1ColNames = GraphUtil.getColumnNames(t1);
+ String[] t2ColNames = GraphUtil.getColumnNames(t2);
+
+
+ log.append("t1 columns: " + format(t1ColNames));
+ log.append("t2 columns: " + format(t2ColNames));
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ protected String format(String[] strings) {
+ String result = "[";
+ for (int ii = 0; ii < strings.length; ii++) {
+ if (ii < strings.length - 1) {
+ result += strings[ii] + ", ";
+ } else {
+ result += strings[ii];
+ }
+ }
+ result += "]";
+ return result;
+ }
+}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsNotPreservedComparer.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsNotPreservedComparer.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsNotPreservedComparer.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -11,17 +11,18 @@
import prefuse.data.Graph;
import prefuse.data.Node;
+import prefuse.data.Schema;
import prefuse.data.Table;
import prefuse.data.Tuple;
import prefuse.util.collections.IntIterator;
-public class IdsNotPreservedComparer extends SimpleGraphComparer {
+public class IdsNotPreservedComparer extends ComplexGraphComparer {
private RunningLog log;
public ComparisonResult compare(Graph g1, Graph g2) {
- this.log = new RunningLog();
-
+ super.clearLog();
+ this.log = super.getLog();
ComparisonResult simpleCompareResult = super.compare(g1, g2);
if (! simpleCompareResult.comparisonSucceeded()) {
@@ -30,10 +31,12 @@
log.append(simpleCompareResult.getLog());
- if (! nodeDegreeFrequenciesEqual(g1, g2))
- return new ComparisonResult(false, "The number of nodes" +
+ if (! nodeDegreeFrequenciesEqual(g1, g2)) {
+ log.prepend("The number of nodes" +
"with a certain number of edges is not the same in" +
- "both graphs.", log);
+ "both graphs.");
+ return new ComparisonResult(false, log);
+ }
/*
* TODO: we could really use a graph isomorphism comparison right
@@ -41,16 +44,22 @@
* a lot through.
*/
- if (! haveSameNodeAttributes(g1, g2))
- return new ComparisonResult(false, "Node attributes are not " +
- "the same in both graphs.", log);
+ if (! haveSameNodeAttributes(g1, g2)) {
+ log.prepend("Node attributes are not " +
+ "the same in both graphs.");
+ return new ComparisonResult(false, log);
+ }
- if (! haveSameEdgeAttributes(g1, g2))
- return new ComparisonResult(false, "Edge attributes are not " +
- "the same in both graphs.", log);
+ if (! haveSameEdgeAttributes(g1, g2)) {
+ log.prepend("Edge attributes are not " +
+ "the same in both graphs.");
+ return new ComparisonResult(false, log);
+ }
//all tests passed
- return new ComparisonResult(true, "All tests succeeded.", log);
+
+ log.prepend("All comparison tests succeeded");
+ return new ComparisonResult(true, log);
}
/*
@@ -136,100 +145,7 @@
return result;
}
- /*
- * These methods do what .equals() should do for their respective objects:
- * Actually compare the contents to see if they are .equals() to each
- * other. The default methods instead appear to be doing a memory
- * location comparison.
- */
-
- private boolean areEqual(Graph g1, Graph g2, boolean sort) {
- Table nodeTable1 = g1.getNodeTable();
- Table nodeTable2 = g2.getNodeTable();
-
- if (sort) {
- if (! areEqualWhenSorted(nodeTable1, nodeTable2))
- return false;
- } else {
- if (! areEqual(nodeTable1, nodeTable2))
- return false;
- }
-
- Table edgeTable1 = g1.getEdgeTable();
- Table edgeTable2 = g2.getEdgeTable();
-
- if (sort) {
- if (! areEqualWhenSorted(edgeTable1, edgeTable2))
- return false;
- } else {
- if (! areEqual(edgeTable1, edgeTable2))
- return false;
- }
-
- return true;
- }
- private boolean areEqualWhenSorted(Table t1, Table t2) {
- boolean result = areEqual(GraphUtil.getSorted(t1),
- GraphUtil.getSorted(t2));
- return result;
- }
-
- /*
- * Cares about the order of nodes and edges as well.
- */
- private boolean areEqual(Table t1, Table t2) {
- Iterator tuplesIterator1 = t1.tuples();
- Iterator tuplesIterator2 = t2.tuples();
-
- while (tuplesIterator1.hasNext()) {
- Tuple tuple1 = (Tuple) tuplesIterator1.next();
- Tuple tuple2 = (Tuple) tuplesIterator2.next();
-
- if (! areEqual(tuple1, tuple2)) {
- return false;
- }
- }
-
- return true;
- }
-
- private boolean areEqual(Tuple tu1, Tuple tu2) {
- if (tu1.getColumnCount() != tu2.getColumnCount()) {
- log.append("Number of columns in tuples differ.");
- log.append("First tuple: " + tu1);
- log.append("Second tuple: " + tu2);
- return false;
- }
-
- for (int ii = 0; ii < tu1.getColumnCount(); ii++) {
- Object columnContents1 = tu1.get(ii);
- Object columnContents2 = tu2.get(ii);
-
- if (columnContents1 == null && columnContents2 == null) {
- //nulls are equal to each other!
- continue;
- } else if (columnContents1 == null) {
- //one is null and the other is not.
- log.append("Bad pair of tuples!");
- log.append(tu1 + " : " + tu2);
- return false;
- } else if (columnContents2 == null) {
- //one is null and the other is not.
- log.append("Bad pair of tuples!");
- log.append(tu1 + " : " + tu2);
- return false;
- } else if (! tu1.get(ii).equals(tu2.get(ii))){
- log.append("Bad pair of tuples!");
- log.append(tu1 + " : " + tu2);
- //neither are null, but they are still not equal.
- return false;
- }
- }
-
- //all column contents are equal.
- return true;
- }
/**
* Removes source and target columns from a copied version of the table.
@@ -254,4 +170,6 @@
}
return tCopy;
}
+
+
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsPreservedComparer.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsPreservedComparer.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/IdsPreservedComparer.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -15,12 +15,13 @@
import prefuse.data.Tuple;
import prefuse.util.collections.IntIterator;
- public class IdsPreservedComparer extends SimpleGraphComparer {
+ public class IdsPreservedComparer extends ComplexGraphComparer {
private RunningLog log;
public ComparisonResult compare(Graph g1, Graph g2) {
- this.log = new RunningLog();
+ super.clearLog();
+ this.log = super.getLog();
ComparisonResult simpleCompareResult = super.compare(g1, g2);
@@ -31,98 +32,16 @@
log.append(simpleCompareResult.getLog());
if (! areEqual(g1, g2, true)) {
- return new ComparisonResult(false, "Graphs do not have the " +
- "same contents.", log);
+ log.prepend("Graphs do not have the same contents");
+ return new ComparisonResult(false, log);
}
//all tests passed
- return new ComparisonResult(true, "All tests succeeded.", log);
+ log.prepend("All comparison tests succeeded.");
+ return new ComparisonResult(true, log);
}
/*
- * Tests whether there are an equal numbers of nodes with the same
- * number of edges in each graph, e.g. 5 nodes with 1 edge, 12 nodes
- * with 2 edges etc.. .
- *
- * Possibly useful when graph IDs are modified by the conversion.
- */
- private boolean nodeDegreeFrequenciesEqual(Graph g1, Graph g2) {
- Set e1 = getNodeDegreeFrequencies(g1);
- Set e2 = getNodeDegreeFrequencies(g2);
-
- boolean result = e1.equals(e2);
- return result;
- }
-
- /*
- * Helper method for nodeDegreeFrequenciesEqual
- */
- private Set getNodeDegreeFrequencies(Graph g) {
- Map nodeDegreeFrequencies
- = new HashMap();
-
- /*
- * TODO: (might want to shortcut all of this by counting from 0 to
- * numberOfNodes)
- */
- Table nodeTable = g.getNodeTable();
- for (IntIterator ii = nodeTable.rows(); ii.hasNext();) {
- int nodeID = ii.nextInt();
- Node node = g.getNode(nodeID);
-
- int numEdges = g.getInDegree(node) + g.getOutDegree(node);
-
- Integer currentFrequency =
- (Integer) nodeDegreeFrequencies.get(new Integer(numEdges));
- if (currentFrequency == null) {
- /*
- * A node with this number of edges has not been recorded yet,
- * so we set the number of occurrences to one.
- */
- nodeDegreeFrequencies.put(new Integer(numEdges),
- new Integer(1));
- } else {
- /*
- * A node with this number of edges has been recorded, so
- * we increment the number of occurrences by one.
- */
- nodeDegreeFrequencies.put(new Integer(numEdges),
- currentFrequency);
- }
- }
-
- //convert the result to a more usable format.
- Set nodeFrequencyPairs
- = nodeDegreeFrequencies.entrySet();
-
- return nodeFrequencyPairs;
- }
-
-
- private boolean haveSameNodeAttributes(Graph g1, Graph g2) {
- Table t1 = getStrippedNodeTable(g1);
- Table t2 = getStrippedNodeTable(g2);
- boolean result = areEqualWhenSorted(t1, t2);
- return result;
- }
-
- /*
- * Determines whether the two graphs have the same edge attributes.
- * That is, for every edge in table A there is an edge in table B with
- * the exactly the same attribute values, and vice versa. Has no regard
- * for source and target IDs, or the order the edgesappear in the edge
- * tables.
- */
- private boolean haveSameEdgeAttributes(Graph g1, Graph g2) {
- //remove the IDs
- Table t1 = getStrippedEdgeTable(g1.getEdgeTable());
- Table t2 = getStrippedEdgeTable(g2.getEdgeTable());
-
- boolean result = areEqualWhenSorted(t1, t2);
- return result;
- }
-
- /*
* These methods do what .equals() should do for their respective objects:
* Actually compare the contents to see if they are .equals() to each
* other. The default methods instead appear to be doing a memory
@@ -154,90 +73,4 @@
return true;
}
-
- private boolean areEqualWhenSorted(Table t1, Table t2) {
- boolean result = areEqual(GraphUtil.getSorted(t1),
- GraphUtil.getSorted(t2));
- return result;
- }
-
- /*
- * Cares about the order of nodes and edges as well.
- */
- private boolean areEqual(Table t1, Table t2) {
- Iterator tuplesIterator1 = t1.tuples();
- Iterator tuplesIterator2 = t2.tuples();
-
- while (tuplesIterator1.hasNext()) {
- Tuple tuple1 = (Tuple) tuplesIterator1.next();
- Tuple tuple2 = (Tuple) tuplesIterator2.next();
-
- if (! areEqual(tuple1, tuple2)) {
- return false;
- }
- }
-
- return true;
- }
-
- private boolean areEqual(Tuple tu1, Tuple tu2) {
- if (tu1.getColumnCount() != tu2.getColumnCount()) {
- log.append("Number of columns in tuples differ.");
- log.append("First tuple: " + tu1);
- log.append("Second tuple: " + tu2);
- return false;
- }
-
- for (int ii = 0; ii < tu1.getColumnCount(); ii++) {
- Object columnContents1 = tu1.get(ii);
- Object columnContents2 = tu2.get(ii);
-
- if (columnContents1 == null && columnContents2 == null) {
- //nulls are equal to each other!
- continue;
- } else if (columnContents1 == null) {
- //one is null and the other is not.
- log.append("Bad pair of tuples!");
- log.append(tu1 + " : " + tu2);
- return false;
- } else if (columnContents2 == null) {
- //one is null and the other is not.
- log.append("Bad pair of tuples!");
- log.append(tu1 + " : " + tu2);
- return false;
- } else if (! tu1.get(ii).equals(tu2.get(ii))){
- log.append("Bad pair of tuples!");
- log.append(tu1 + " : " + tu2);
- //neither are null, but they are still not equal.
- return false;
- }
- }
-
- //all column contents are equal.
- return true;
- }
-
- /**
- * Removes source and target columns from a copied version of the table.
- *
- * Helper method for haveSameEdgeAttributes
- *
- * @param t the original table
- * @return a stripped copy of the original table
- */
- private Table getStrippedEdgeTable(Table t) {
- Table tCopy = GraphUtil.copyTable(t);
- tCopy.removeColumn(Graph.DEFAULT_SOURCE_KEY);
- tCopy.removeColumn(Graph.DEFAULT_TARGET_KEY);
- return tCopy;
- }
-
- private Table getStrippedNodeTable(Graph g) {
- Table tCopy = GraphUtil.copyTable(g.getNodeTable());
- String nodeKeyField = g.getNodeKeyField();
- if (nodeKeyField != null) {
- tCopy.removeColumn(nodeKeyField);
- }
- return tCopy;
- }
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/LossyComparer.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/LossyComparer.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/LossyComparer.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -17,14 +17,16 @@
this.log = new RunningLog();
if (g1 == null || g2 == null) {
- return new ComparisonResult(false, "At least one of the provided" +
- " graphs was null.", log);
+ log.prepend("At least one of the provided graphs was null");
+ return new ComparisonResult(false, log);
}
if (! isEqualNodeCount(g1, g2)) {
- return new ComparisonResult(false, "Node counts not equal.", log);
+ log.prepend("Node counts not equal.");
+ return new ComparisonResult(false, log);
} else if (! isEqualEdgeCount(g1, g2)) {
- return new ComparisonResult(false, "Edge counts not equal.", log);
+ log.prepend("Edge counts not equal.");
+ return new ComparisonResult(false, log);
}
//all tests succeeded.
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/SimpleGraphComparer.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/SimpleGraphComparer.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/graphcomparison/SimpleGraphComparer.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -15,17 +15,19 @@
this.log = new RunningLog();
if (g1 == null || g2 == null) {
- return new ComparisonResult(false, "At least one of the provided" +
- " graphs was null.", log);
+ log.prepend("At least one of the provided graphs was null");
+ return new ComparisonResult(false, log);
}
//basic tests
if (! isSameDirectedness(g1, g2)) {
- return new ComparisonResult(false, "Directedness not of the " +
- "same type.", log);
+ log.prepend("Directedness not of the same type");
+ return new ComparisonResult(false, log);
} else if (! isEqualNodeCount(g1, g2)) {
- return new ComparisonResult(false, "Node counts not equal.", log);
+ log.prepend("Node counts not equal.");
+ return new ComparisonResult(false, log);
} else if (! isEqualEdgeCount(g1, g2)) {
- return new ComparisonResult(false, "Edge counts not equal.", log);
+ log.prepend("Edge counts not equal");
+ return new ComparisonResult(false, log);
}
//all tests succeeded.
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -222,7 +222,6 @@
String currentConvName = (String) compareConvRef.getProperty("service.pid");
if (failedConvName.equals(currentConvName)) {
//reached where the converters broke
- System.out.println("Reached the end in compare phase");
break;
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -94,14 +94,14 @@
report.println("Trusted Converters...");
for (int ii = 0; ii < trustedConvs.size(); ii++) {
ConvResult cr = (ConvResult) trustedConvs.get(ii);
- report.println(" " + cr.getName());
+ report.println(" " + cr.getNameNoPackage());
}
report.println("");
report.println("Non-Trusted Converters...");
for (int ii = 0; ii < nonTrustedConvs.size(); ii++) {
ConvResult cr = (ConvResult) nonTrustedConvs.get(ii);
- report.println(" " + cr.getName());
+ report.println(" " + cr.getNameNoPackage());
}
report.println("");
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -32,7 +32,7 @@
ConvResult convResult = cr;
ServiceReference conv = convResult.getRef();
- File reportFile = new File(ReportGenerator.TEMP_DIR + cr.getName());
+ File reportFile = new File(ReportGenerator.TEMP_DIR + cr.getNameWithPackage());
reportOutStream = new FileOutputStream(reportFile);
PrintStream report = new PrintStream(reportOutStream);
@@ -40,7 +40,7 @@
report.println("Converter Report");
report.println("--------------------------------------");
report.println("");
- report.println(conv.getProperty("service.pid"));
+ report.println(cr.getNameWithPackage());
report.println("");
if (convResult.isTrusted()) {
report.println("Trusted");
@@ -64,7 +64,7 @@
TestResult[] involvedTests = cr.getTests();
for (int ii = 0; ii < involvedTests.length; ii++) {
TestResult tr = involvedTests[ii];
- report.println(" " + tr.getFullName());
+ report.println(" " + tr.getNameWithSuccess());
}
report.println("");
@@ -89,12 +89,10 @@
TestReport[] testReports = (TestReport[]) testReportsList
.toArray(new TestReport[0]);
- System.out.println("Converter " + cr.getName()
- + " is associate with " + testReports.length + " tests");
String summary = "";
this.convReport = new ConvReport(reportFile, new TestReport[0], cr
- .getName(), summary);
+ .getNameNoPackageWithTrust(), summary);
report.println("");
report.flush();
reportOutStream.close();
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -58,7 +58,7 @@
report.println("Completely Passed Tests...");
for (int ii = 0; ii < passedTRs.length; ii++) {
TestResult passedTR = passedTRs[ii];
- report.println(" " + passedTR.getFullName());
+ report.println(" " + passedTR.getNameWithSuccess());
}
report.println("");
@@ -66,7 +66,7 @@
report.println("Partially Passed Tests...");
for (int ii = 0; ii < pPassedTRs.length; ii++) {
TestResult pPassedTR = pPassedTRs[ii];
- report.println(" " + pPassedTR.getFullName());
+ report.println(" " + pPassedTR.getNameWithSuccess());
}
report.println("");
@@ -75,7 +75,7 @@
TestResult[] failedTRs = atr.getFailedTestResults();
for (int ii = 0; ii < failedTRs.length; ii++) {
TestResult failedTR = failedTRs[ii];
- report.println(" " + failedTR.getFullName());
+ report.println(" " + failedTR.getNameWithSuccess());
}
report.println("");
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -13,6 +13,7 @@
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.TestReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.TestResult;
+import org.cishell.testing.convertertester.core.tester2.util.ConvUtil;
import org.osgi.framework.ServiceReference;
import org.osgi.service.log.LogService;
@@ -57,7 +58,8 @@
for (int ii = 0; ii < testConvs.size(); ii++) {
ServiceReference ref = testConvs.getRef(ii);
String name = ref.getProperty("service.pid").toString();
- report.println(" " + name);
+ String nameWithoutPackage = ConvUtil.removePackagePrefix(name);
+ report.println(" " + nameWithoutPackage);
}
report.println("");
@@ -66,7 +68,8 @@
for (int ii = 0; ii < compareConvs.size(); ii++) {
ServiceReference ref = compareConvs.getRef(ii);
String name = ref.getProperty("service.pid").toString();
- report.println(" " + name);
+ String nameWithoutPackage = ConvUtil.removePackagePrefix(name);
+ report.println(" " + nameWithoutPackage);
}
report.println("");
@@ -119,7 +122,7 @@
// String summary = "%" + percentSuccessful + " Successful";
String summary = "";
- this.testReport = new TestReport(reportFile, tr.getFullName(),
+ this.testReport = new TestReport(reportFile, tr.getNameWithSuccess(),
new FilePassReport[0],
new FilePassReport[0],
// (FilePassReport[]) successfulFPReports.toArray(new FilePassReport[0]),
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -51,7 +51,7 @@
boolean wroteAttributes = false;
for (int ii = 0; ii < convs.length ; ii++) {
ConvResult cr = convs[ii];
- if (cr.getName().equals(convName)) {
+ if (cr.getNameWithPackage().equals(convName)) {
int trusted;
if (cr.isTrusted()) {
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/ConvResult.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -8,9 +8,9 @@
import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.FilePassFailure;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.FilePassSuccess;
+import org.cishell.testing.convertertester.core.tester2.util.ConvUtil;
import org.osgi.framework.ServiceReference;
-
public class ConvResult {
private ServiceReference conv;
@@ -59,10 +59,41 @@
this.tests.add(tr);
}
- public String getName() {
+ /**
+ * Returns the full unique name of the converter, including the package
+ * it is found in.
+ * @return full unique name
+ */
+ public String getNameWithPackage() {
return (String) this.getRef().getProperty("service.pid");
}
+ /**
+ * Returns a shortened version of the name, which does not contain the
+ * package. This name is not guaranteed to be unique, but is easier
+ * for humans to read.
+ * @return The shortened name
+ */
+ public String getNameNoPackage() {
+ return ConvUtil.removePackagePrefix(getNameWithPackage());
+ }
+
+ /**
+ * Returns the shortened name, with either "Trusted" or "Not Trusted"
+ * prepended to the front.
+ * @return The shortened name with trust information.
+ */
+ public String getNameNoPackageWithTrust() {
+ String nameNoPackageWithTrust = " - " + getNameNoPackage() ;
+ if (isTrusted()) {
+ nameNoPackageWithTrust = "Trusted" + nameNoPackageWithTrust;
+ } else {
+ nameNoPackageWithTrust = "Not Trusted" + nameNoPackageWithTrust;
+ }
+
+ return nameNoPackageWithTrust;
+ }
+
public TestResult[] getTests() {
return (TestResult[]) this.tests.toArray(new TestResult[0]);
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java 2007-08-20 17:46:46 UTC (rev 492)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -96,7 +96,7 @@
return this.name;
}
- public String getFullName() {
+ public String getNameWithSuccess() {
return getName() + " - " + getSummary();
}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/util/ConvUtil.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/util/ConvUtil.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/util/ConvUtil.java 2007-08-22 17:26:12 UTC (rev 493)
@@ -0,0 +1,12 @@
+package org.cishell.testing.convertertester.core.tester2.util;
+
+public class ConvUtil {
+
+ /*
+ * Returns everything after the last period in the OSGi service pid.
+ */
+ public static String removePackagePrefix(String pid) {
+ int startIndex = pid.lastIndexOf(".") + 1;
+ return pid.substring(startIndex);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-20 17:56:34
|
Revision: 492
http://cishell.svn.sourceforge.net/cishell/?rev=492&view=rev
Author: mwlinnem
Date: 2007-08-20 10:46:46 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
Removed System.out.printlns
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/FilePassReport.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterGraph.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -280,7 +280,6 @@
}
private void writeNodes(BufferedWriter bw, Map nodes) throws IOException{
- System.out.println("*Nodes " + nodes.size() + "\n");
writeNodeHeader(bw, nodes.size());
String[] keySet = new String[nodes.keySet().size()];
keySet = (String[])nodes.keySet().toArray(keySet);
@@ -298,14 +297,12 @@
private void writeEdges(BufferedWriter bw, TreeSet edges) throws IOException{
- System.out.println("*DirectedEdges " + edges.size());
writeEdgeHeader(bw,edges.size());
String[] edgeArray = new String[edges.size()];
edgeArray = (String[])edges.toArray(edgeArray);
for(int i = 0; i < edgeArray.length; i++){
- System.out.println(edgeArray[i]);
bw.flush();
bw.write(edgeArray[i]+"\n");
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/converter/graph/ConverterPath.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -54,7 +54,7 @@
boolean val = true;
if(path.contains(sr)){
- System.out.println("Path already contains " + sr.getProperty("service.pid"));
+// System.out.println("Path already contains " + sr.getProperty("service.pid"));
return false;
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/ConvResultMaker.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -203,7 +203,6 @@
if (fprFailure.getPhase().equals(ConvertPhaseFailure.TEST_PHASE) &&
failedConvName.equals(currentConvName)) {
//reached where the converters broke
- System.out.println("Reached the end in test phase");
break;
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/AllConvsReportGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -19,7 +19,7 @@
public static final String TEMP_FILE_PATH = "All-Converters-Report2.txt";
- private ConvReportSubGenerator convSubGen = new ConvReportSubGenerator();
+ private ConvReportSubGenerator convSubGen;
private AllConvsReport allConvsReport = null;
@@ -27,6 +27,8 @@
public AllConvsReportGenerator(LogService log) {
this.log = log;
+
+ this.convSubGen = new ConvReportSubGenerator(this.log);
}
public void generateReport(AllTestsResult atr) {
@@ -121,14 +123,12 @@
reportOutStream.close();
} catch (IOException e) {
- System.out.println("Unable to generate all converters report.");
- e.printStackTrace();
+
+ this.log.log(LogService.LOG_ERROR, "Unable to generate all converters report.", e);
try {
if (reportOutStream != null) reportOutStream.close();
} catch (IOException e2) {
- System.out.println("Unable to close all convertersreport" +
- " stream");
- e2.printStackTrace();
+ this.log.log(LogService.LOG_ERROR, "Unable to generate all converters report.", e);
}
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -13,11 +13,18 @@
import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.TestResult;
import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
public class ConvReportSubGenerator {
private ConvReport convReport = null;
-
+
+ private LogService log;
+
+ public ConvReportSubGenerator(LogService log) {
+ this.log = log;
+ }
+
public void generate(ConvResult cr) {
FileOutputStream reportOutStream = null;
@@ -92,15 +99,12 @@
report.flush();
reportOutStream.close();
} catch (IOException e) {
- System.out.println("Unable to generate a converter report.");
- e.printStackTrace();
+ this.log.log(LogService.LOG_ERROR, "Unable to generate a converter report.", e);
try {
if (reportOutStream != null)
reportOutStream.close();
} catch (IOException e2) {
- System.out.println("Unable to close a converter report" +
- " stream");
- e2.printStackTrace();
+ this.log.log(LogService.LOG_ERROR, "Unable to close a converter report", e);
}
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -26,7 +26,8 @@
public AllTestsReportGenerator(LogService log) {
this.log = log;
- this.testResultSubGen = new TestReportSubGenerator();
+
+ this.testResultSubGen = new TestReportSubGenerator(this.log);
}
public void generateReport(AllTestsResult atr) {
@@ -117,8 +118,8 @@
(TestReport[]) failedTRReports.toArray(new TestReport[0]),
summary);
} catch (IOException e) {
- System.out.println("Unable to generate all tests report.");
- e.printStackTrace();
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to generate all tests report.", e);
closeStream(reportOutStream);
} finally {
closeStream(reportOutStream);
@@ -135,8 +136,8 @@
stream.close();
}
} catch (IOException e2) {
- System.out.println("Unable to close all tests report stream");
- e2.printStackTrace();
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to close all tests report stream", e2);
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -9,12 +9,18 @@
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.FilePassReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.ConvertPhaseFailure;
+import org.osgi.service.log.LogService;
public class FilePassSubGenerator {
private FilePassReport filePassReport;
-
-
+
+ private LogService log;
+
+ public FilePassSubGenerator(LogService log) {
+ this.log = log;
+ }
+
public void generateSubreport(FilePassResult fpr) {
FileOutputStream reportOutStream = null;
try {
@@ -41,8 +47,8 @@
summary);
} catch (IOException e) {
- System.out.println("Unable to generate file pass report.");
- e.printStackTrace();
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to generate file pass report.", e);
closeStream(reportOutStream);
} finally {
closeStream(reportOutStream);
@@ -95,8 +101,8 @@
if (stream != null)
stream.close();
} catch (IOException e2) {
- System.out.println("Unable to close file pass report stream");
- e2.printStackTrace();
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to close file pass report stream", e2);
}
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -14,6 +14,7 @@
import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.TestResult;
import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
public class TestReportSubGenerator {
@@ -21,8 +22,12 @@
private FilePassSubGenerator filePassSubGen;
- public TestReportSubGenerator() {
- this.filePassSubGen = new FilePassSubGenerator();
+ private LogService log;
+
+ public TestReportSubGenerator(LogService log) {
+ this.log = log;
+
+ this.filePassSubGen = new FilePassSubGenerator(this.log);
}
public void generateSubreport(TestResult tr) {
@@ -123,8 +128,8 @@
} catch (IOException e) {
- System.out.println("Unable to generate a test report.");
- e.printStackTrace();
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to generate a test report.", e);
closeStream(reportOutStream);
} finally {
closeStream(reportOutStream);
@@ -140,8 +145,8 @@
if (stream != null)
stream.close();
} catch (IOException e2) {
- System.out.println("Unable to close a test report stream");
- e2.printStackTrace();
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to close a test report stream", e2);
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/convgraph/GraphReportGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -77,13 +77,13 @@
}
} catch (IOException e) {
- System.out.println("Unable to generate Graph Report.");
- e.printStackTrace();
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to generate Graph Report.", e);
try {
if (reader != null) reader.close();
} catch (IOException e2) {
- System.out.println("Unable to close graph report stream");
- e2.printStackTrace();
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to close graph report stream", e);
}
} finally {
try {
@@ -95,7 +95,9 @@
writer.close();
}
} catch (IOException e) {
- System.out.println("Unable to close either graph report reader or writer.");
+ this.log.log(LogService.LOG_ERROR,
+ "Unable to close either graph report reader or " +
+ "writer.", e);
e.printStackTrace();
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -17,8 +17,8 @@
* load a file with the report text inside it, and return it as is.
*/
public void generateReport(AllTestsResult atr) {
- String readmePath = TestFileKeeper.DEFAULT_ROOT_DIR + "ReportREADME.txt";
- System.out.println("ReadMe path is: " + readmePath);
+ String readmePath = TestFileKeeper.DEFAULT_ROOT_DIR +
+ "ReportREADME.txt";
File readmeFile = new File(readmePath);
this.readme = new ReadMeReport(readmeFile, "README", "");
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/FilePassReport.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/FilePassReport.java 2007-08-20 17:24:09 UTC (rev 491)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/reports/FilePassReport.java 2007-08-20 17:46:46 UTC (rev 492)
@@ -10,7 +10,6 @@
private String summary;
public FilePassReport (File filePassReport, String name, String summary) {
- System.out.println("File pass report constructor, name is :" + name);
this.filePassReport = filePassReport;
this.name = name;
this.summary = summary;
@@ -21,7 +20,6 @@
}
public String getName() {
- System.out.println("Returning name " + this.name);
return this.name;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 491
http://cishell.svn.sourceforge.net/cishell/?rev=491&view=rev
Author: mwlinnem
Date: 2007-08-20 10:24:09 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
Added extra info about where file passes fail to report.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-20 17:23:33 UTC (rev 490)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-20 17:24:09 UTC (rev 491)
@@ -8,6 +8,7 @@
import org.cishell.testing.convertertester.core.tester2.reportgen.ReportGenerator;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.FilePassReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.filepass.ConvertPhaseFailure;
public class FilePassSubGenerator {
@@ -61,6 +62,25 @@
report.println("");
report.println("File used : " + fpr.getOriginalFileLabel());
+ String resultType = fpr.getType();
+ if (resultType.equals(FilePassResult.SUCCESS)) {
+ //nothing else to be done
+ } else if (resultType.equals(FilePassResult.CONVERT_FAILURE)) {
+ ConvertPhaseFailure convertFailFpr = (ConvertPhaseFailure) fpr;
+
+ report.println("");
+ if (convertFailFpr.getPhase().equals(ConvertPhaseFailure.TEST_PHASE)) {
+ report.println("Failed in test converters");
+ report.println("at : " + convertFailFpr.getFailedConverter());
+ } else { //failed during comparison conversion phase
+ report.println("Failed in comparison converters");
+ report.println("at : " + convertFailFpr.getFailedConverter());
+ }
+ } else if (resultType.equals(FilePassResult.COMPARE_FAILURE)) {
+ report.println("Failed while comparing original and result files.");
+ }
+
+ report.println("");
if (! fpr.getExplanation().trim().equals("")) {
report.println("Explanation... \n" + fpr.getExplanation());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-20 17:23:38
|
Revision: 490
http://cishell.svn.sourceforge.net/cishell/?rev=490&view=rev
Author: mwlinnem
Date: 2007-08-20 10:23:33 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
We now redirect log errors into the reports.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
Added Paths:
-----------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/FakeLogCIShellContext.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/FakeLogService.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/LogEntry.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-20 17:13:04 UTC (rev 489)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-20 17:23:33 UTC (rev 490)
@@ -15,6 +15,8 @@
import org.cishell.framework.data.Data;
import org.cishell.testing.convertertester.core.converter.graph.ConverterPath;
import org.cishell.testing.convertertester.core.tester.graphcomparison.ComparisonResult;
+import org.cishell.testing.convertertester.core.tester2.fakelogger.LogEntry;
+import org.cishell.testing.convertertester.core.tester2.fakelogger.FakeLogCIShellContext;
import org.cishell.testing.convertertester.core.tester2.graphcomparison.NewGraphComparer;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.FilePassResult;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.converter.ConvFailureInfo;
@@ -120,35 +122,50 @@
Data[] currentData = getFilePathData(startData);
AlgorithmFactory[] converterAlgs = converters.getPathAsAlgorithms();
+ /*
+ * rig up fake CISHellContext so we can get ahold of
+ * errors sent to logger.
+ */
+ FakeLogCIShellContext fakeCContext =
+ new FakeLogCIShellContext(testData.getContext());
+
AlgorithmFactory currentConverterAlg = converterAlgs[0];
try {
for (int ii = 0; ii < converterAlgs.length; ii++) {
currentConverterAlg = converterAlgs[ii];
+
Algorithm currentAlgorithm =
currentConverterAlg.createAlgorithm(currentData,
- new Hashtable(), testData.getContext());
+ new Hashtable(), fakeCContext);
currentData = currentAlgorithm.execute();
- if (currentData == null) {
+ /*
+ * There are two ways that converters generally fail.
+ * 1) They throw an exception that propagates out into
+ * this method, where we catch it.
+ * 2) They catch their own exception, send it to the logger,
+ * and return null.
+ */
+ if (currentData == null || currentData[0].getData() == null) {
String converterName = converters.getConverterName(ii);
+
+ String explanation = "Result data is null. \n";
+
+
+ if (fakeCContext.hasLogEntries()) {
+ String logText = extractLogText(fakeCContext);
+ explanation += "Error log contains the following: \n" +
+ logText;
+ } else {
+ explanation += "No errors logged. Cause unknown. \n";
+ }
+
ConvFailureInfo failInfo = new ConvFailureInfo(
- "Result data is null. " +
- "Check NWB GUI Console for specific error.",
- converterName);
+ explanation, converterName);
+
ConvertResult result = new ConvertResult(failInfo);
return result;
}
-
- Data currentDataImpl = (Data) currentData[0];
- if (currentDataImpl.getData() == null) {
- String converterName = converters.getConverterName(ii);
- ConvFailureInfo failInfo = new ConvFailureInfo(
- "Contents of result data is null. " +
- "Check NWB GUI Console for specific error.",
- converterName);
- ConvertResult result = new ConvertResult(failInfo);
- return result;
- }
}
} catch (Throwable t) {
ConvFailureInfo failInfo = new ConvFailureInfo(getStackTrace(t),
@@ -218,4 +235,23 @@
}
}
-}
+
+ private String extractLogText(FakeLogCIShellContext fakeLogContext) {
+ LogEntry[] entries = fakeLogContext.getLogEntries();
+
+ String logText = "";
+
+ for (int ii = 0; ii < entries.length; ii++) {
+ LogEntry entry = entries[ii];
+
+ Throwable e = entry.getThrowable();
+ String message = entry.getMessage();
+
+ logText += message + "\n";
+ logText += getStackTrace(e) + "\n";
+ logText += "\n";
+ }
+
+ return logText;
+ }
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/FakeLogCIShellContext.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/FakeLogCIShellContext.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/FakeLogCIShellContext.java 2007-08-20 17:23:33 UTC (rev 490)
@@ -0,0 +1,41 @@
+package org.cishell.testing.convertertester.core.tester2.fakelogger;
+
+import org.cishell.framework.CIShellContext;
+import org.osgi.service.log.LogService;
+
+public class FakeLogCIShellContext implements CIShellContext {
+
+ private CIShellContext realCContext;
+
+ private FakeLogService fakeLogger;
+
+ public FakeLogCIShellContext(CIShellContext realCContext) {
+ this.realCContext = realCContext;
+ this.fakeLogger = new FakeLogService((LogService) realCContext
+ .getService(LogService.class.getName()));
+
+
+ }
+
+ public Object getService(String service) {
+ if (service.equals(LogService.class.getName())) {
+ return this.fakeLogger;
+ } else {
+ return this.realCContext.getService(service);
+ }
+ }
+
+
+
+ public LogEntry[] getLogEntries() {
+ return this.fakeLogger.getLogEntries();
+ }
+
+ public void clearLogEntires() {
+ this.fakeLogger.clearLogEntries();
+ }
+
+ public boolean hasLogEntries() {
+ return this.fakeLogger.hasLogEntries();
+ }
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/FakeLogService.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/FakeLogService.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/FakeLogService.java 2007-08-20 17:23:33 UTC (rev 490)
@@ -0,0 +1,69 @@
+package org.cishell.testing.convertertester.core.tester2.fakelogger;
+
+import java.util.ArrayList;
+
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.log.LogService;
+
+import java.util.List;
+
+public class FakeLogService implements LogService {
+
+
+ private List logMessages;
+ private LogService realLog;
+
+ public FakeLogService(LogService realLogService) {
+ this.realLog = realLogService;
+
+ this.logMessages = new ArrayList();
+ }
+
+ public void log(int level, String message) {
+ if (level == LOG_ERROR) {
+ this.logMessages.add(new LogEntry(message));
+ } else {
+ this.realLog.log(level, message);
+ }
+ }
+
+ public void log(int level, String message, Throwable exception) {
+ if (level == LOG_ERROR) {
+ this.logMessages.add(new LogEntry(message, exception));
+ } else {
+ this.realLog.log(level, message, exception);
+ }
+ }
+
+ public void log(ServiceReference sr, int level, String message) {
+ if (level == LOG_ERROR) {
+ this.logMessages.add(new LogEntry(message));
+ } else {
+ this.realLog.log(sr, level, message);
+ }
+ }
+
+ public void log(ServiceReference sr, int level, String message,
+ Throwable exception) {
+ if (level == LOG_ERROR) {
+ this.logMessages.add(new LogEntry(message, exception));
+ } else {
+ this.realLog.log(sr, level, message, exception);
+ }
+ }
+
+ public LogEntry[] getLogEntries() {
+ return (LogEntry[])
+ this.logMessages.toArray(new LogEntry[0]);
+ }
+
+ public void clearLogEntries() {
+ this.logMessages = new ArrayList();
+ }
+
+ public boolean hasLogEntries() {
+ return this.logMessages.size() > 0;
+ }
+
+
+}
Added: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/LogEntry.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/LogEntry.java (rev 0)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/fakelogger/LogEntry.java 2007-08-20 17:23:33 UTC (rev 490)
@@ -0,0 +1,30 @@
+package org.cishell.testing.convertertester.core.tester2.fakelogger;
+
+/**
+ * Too much unnecessary stuff in real official OSGi LogEntry.
+ * This should do.
+ * @author mwlinnem
+ *
+ */
+public class LogEntry {
+
+ private String message;
+ private Throwable exception;
+
+ public LogEntry(String message) {
+ this(message, null);
+ }
+
+ public LogEntry(String message, Throwable exception) {
+ this.message = message;
+ this.exception = exception;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public Throwable getThrowable() {
+ return this.exception;
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 489
http://cishell.svn.sourceforge.net/cishell/?rev=489&view=rev
Author: mwlinnem
Date: 2007-08-20 10:13:04 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
Updated warning message.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-20 16:18:19 UTC (rev 488)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithm.java 2007-08-20 17:13:04 UTC (rev 489)
@@ -53,12 +53,11 @@
public Data[] execute() {
- this.log.log(LogService.LOG_WARNING,
- "-------NOTICE-------" + "\n" +
+ this.log.log(LogService.LOG_INFO,
+ "-------NOTICE-------" + "\n" +
"The Converter Tester will take " +
- "approximately 30 seconds to run all the tests, and around " +
- "20 seconds to display all the results. Thank you for " +
- "waiting :)" + "\n" +
+ "approximately 30 seconds to run all the tests. \n" +
+ "Thank you for waiting :)" + "\n" +
"-----END NOTICE-----");
Data[] returnDM;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-20 16:18:26
|
Revision: 488
http://cishell.svn.sourceforge.net/cishell/?rev=488&view=rev
Author: mwlinnem
Date: 2007-08-20 09:18:19 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
Allows new files to have the same label as files that have been removed.
Modified Paths:
--------------
trunk/core/org.cishell.reference/src/org/cishell/reference/app/service/datamanager/DataManagerServiceImpl.java
Modified: trunk/core/org.cishell.reference/src/org/cishell/reference/app/service/datamanager/DataManagerServiceImpl.java
===================================================================
--- trunk/core/org.cishell.reference/src/org/cishell/reference/app/service/datamanager/DataManagerServiceImpl.java 2007-08-17 20:14:18 UTC (rev 487)
+++ trunk/core/org.cishell.reference/src/org/cishell/reference/app/service/datamanager/DataManagerServiceImpl.java 2007-08-20 16:18:19 UTC (rev 488)
@@ -29,7 +29,6 @@
public class DataManagerServiceImpl implements DataManagerService {
private Map modelToLabelMap;
private Map labelToModelMap;
- private Map substringToNumberMap;
private Map labelToNumOccurrences;
private Set models;
private Set selectedModels;
@@ -42,7 +41,6 @@
public DataManagerServiceImpl() {
modelToLabelMap = new HashMap();
labelToModelMap = new HashMap();
- substringToNumberMap = new HashMap();
labelToNumOccurrences = new HashMap();
models = new HashSet();
listeners = new HashSet();
@@ -213,6 +211,7 @@
labelToModelMap.remove(label);
modelToLabelMap.remove(model);
+ labelToNumOccurrences.remove(label);
models.remove(model);
for (Iterator iter=listeners.iterator(); iter.hasNext();) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-17 20:14:20
|
Revision: 487
http://cishell.svn.sourceforge.net/cishell/?rev=487&view=rev
Author: mwlinnem
Date: 2007-08-17 13:14:18 -0700 (Fri, 17 Aug 2007)
Log Message:
-----------
Cleaned up report presentation.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-17 19:52:31 UTC (rev 486)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/DefaultTestRunner.java 2007-08-17 20:14:18 UTC (rev 487)
@@ -151,8 +151,7 @@
}
}
} catch (Throwable t) {
- ConvFailureInfo failInfo = new ConvFailureInfo(t.toString()
- + getStackTrace(t),
+ ConvFailureInfo failInfo = new ConvFailureInfo(getStackTrace(t),
currentConverterAlg.getClass().toString());
ConvertResult result = new ConvertResult(failInfo);
return result;
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-17 19:52:31 UTC (rev 486)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/FilePassSubGenerator.java 2007-08-17 20:14:18 UTC (rev 487)
@@ -62,7 +62,7 @@
report.println("File used : " + fpr.getOriginalFileLabel());
if (! fpr.getExplanation().trim().equals("")) {
- report.println("Explanation :" + fpr.getExplanation());
+ report.println("Explanation... \n" + fpr.getExplanation());
}
report.println("");
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-17 19:52:31 UTC (rev 486)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-17 20:14:18 UTC (rev 487)
@@ -69,21 +69,24 @@
report.println("");
FilePassResult[] successfulFPs = tr.getFilePassSuccesses();
report.println("Successful File Passes...");
+ report.println("");
for (int ii = 0; ii < successfulFPs.length; ii++) {
FilePassResult successfulFP = successfulFPs[ii];
namePass("Successful", successfulFP, tr, ii);
- report.println(successfulFP.getName() + successfulFP.getShortSummary());
+ report.println(successfulFP.getName() +
+ " - " + successfulFP.getShortSummary());
filePassSubGen.writeReport(report, successfulFP);
}
report.println("");
FilePassResult[] failedFPs = tr.getFilePassFailures();
report.println("Failed File Passes...");
+ report.println("");
for (int ii = 0; ii < failedFPs.length; ii++) {
FilePassResult failedFP = failedFPs[ii];
namePass("Failed", failedFP, tr, ii);
- report.println("--------");
- report.println(failedFP.getName() + failedFP.getShortSummary());
+ report.println(failedFP.getName()
+ + " - " + failedFP.getShortSummary());
filePassSubGen.writeReport(report, failedFP);
report.println("");
}
@@ -144,6 +147,7 @@
private void namePass(String prefix, FilePassResult fp, TestResult parent,
int index) {
- fp.setName(prefix + " Pass " + index + " of " + parent.getName() + " . ");
+ fp.setName("Pass " + index);
+// fp.setName(prefix + " Pass " + index + " of " + parent.getName() + " . ");
}
}
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java 2007-08-17 19:52:31 UTC (rev 486)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java 2007-08-17 20:14:18 UTC (rev 487)
@@ -97,7 +97,7 @@
}
public String getFullName() {
- return getSummary() + " " + getName();
+ return getName() + " - " + getSummary();
}
public String getFormat() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-17 19:52:33
|
Revision: 486
http://cishell.svn.sourceforge.net/cishell/?rev=486&view=rev
Author: mwlinnem
Date: 2007-08-17 12:52:31 -0700 (Fri, 17 Aug 2007)
Log Message:
-----------
Method that makes labels unique no longer garbles labels that naturally have digits on their ends, and only adds a suffix on copies (unique files don't have .1 appended)
Modified Paths:
--------------
trunk/core/org.cishell.reference/src/org/cishell/reference/app/service/datamanager/DataManagerServiceImpl.java
Modified: trunk/core/org.cishell.reference/src/org/cishell/reference/app/service/datamanager/DataManagerServiceImpl.java
===================================================================
--- trunk/core/org.cishell.reference/src/org/cishell/reference/app/service/datamanager/DataManagerServiceImpl.java 2007-08-17 19:47:55 UTC (rev 485)
+++ trunk/core/org.cishell.reference/src/org/cishell/reference/app/service/datamanager/DataManagerServiceImpl.java 2007-08-17 19:52:31 UTC (rev 486)
@@ -30,6 +30,7 @@
private Map modelToLabelMap;
private Map labelToModelMap;
private Map substringToNumberMap;
+ private Map labelToNumOccurrences;
private Set models;
private Set selectedModels;
@@ -42,6 +43,7 @@
modelToLabelMap = new HashMap();
labelToModelMap = new HashMap();
substringToNumberMap = new HashMap();
+ labelToNumOccurrences = new HashMap();
models = new HashSet();
listeners = new HashSet();
}
@@ -107,42 +109,102 @@
models.add(model);
}
+ /**
+ * Ensures that the label is unique by comparing it to the labels
+ * currently in the data manager. If the label is unique, simply
+ * return it. Otherwise add a numeric suffix indicating which
+ * occurrence of the label it is (Starting at 2, going up).
+ * @param label The label we are examining for uniqueness
+ * @return A unique version of the provided label.
+ */
private String findUniqueLabel(String label) {
- int lastIndex = label.length() - 1;
- boolean foundNumber = false;
- while (lastIndex > 0 && Character.isDigit(label.charAt(lastIndex))) {
- foundNumber = true;
- lastIndex--;
- }
-
- String newLabel = label.substring(0,lastIndex + 1);
- if (newLabel.charAt(newLabel.length()-1) != ' ') {
- newLabel = newLabel + ".";
- }
-
-
- Integer oldNumber = (Integer) substringToNumberMap.get(newLabel);
- if (oldNumber != null) {
- oldNumber = new Integer(oldNumber.intValue() + 1);
- } else {
- oldNumber = new Integer(1);
- }
-
- substringToNumberMap.put(newLabel,oldNumber);
-
- if (foundNumber) {
- int oldNum = oldNumber.intValue();
- int number = Integer.parseInt(label.substring(lastIndex+1));
-
- if (number < oldNum && getModelForLabel(newLabel + number) == null) {
- return newLabel + number;
- }
- }
-
- newLabel = newLabel + oldNumber;
-
- return newLabel;
+ Integer numOccurences = (Integer) labelToNumOccurrences.get(label);
+
+ if (numOccurences == null) {
+ //the label is unique
+ labelToNumOccurrences.put(label, new Integer(1));
+ return label;
+
+ } else {
+ //the label is not unique
+ int numOccurrencesVal = numOccurences.intValue();
+
+ int newNumOccurrencesVal = numOccurrencesVal + 1;
+
+ String newLabel = label + "." + newNumOccurrencesVal;
+
+ /*
+ * In the rare case that someone sneaky sticks in a label that is
+ * identical to our newly generated 'unique' label, keep
+ * incrementing the value of the suffix until it makes the new
+ * label unique.
+ */
+ while (getModelForLabel(newLabel) != null) {
+ newNumOccurrencesVal++;
+ newLabel = label + "." + newNumOccurrencesVal;
+ }
+
+ /*
+ * remember how many occurrences of the original label we have.
+ */
+ labelToNumOccurrences.put(label,
+ new Integer(newNumOccurrencesVal));
+
+ /*
+ * also, remember that we now have a new label which might be
+ * duplicated. For example, if we had whatever.xml and
+ * whatever.xml.2, if someone tried to add a new label
+ * whatever.xml we would return whatever.xml.3, BUT if
+ * someone tried to add whatever.xml.2, we would return
+ * whatever.xml.2.2 (the second version of the second version
+ * of whatever.xml). Maybe not the best way to do this, but
+ * it makes sense.
+ */
+ labelToNumOccurrences.put(newLabel, new Integer(1));
+
+ return newLabel;
+ }
+
+// int lastIndex = label.length() - 1;
+// boolean foundNumber = false;
+//
+// //set last index to the index before any trailing digits
+// while (lastIndex > 0 && Character.isDigit(label.charAt(lastIndex))) {
+// foundNumber = true;
+// lastIndex--;
+// }
+//
+// //set newLabel to the old label, minus the numbers at the end
+// String newLabel = label.substring(0,lastIndex + 1);
+//
+// //if the last character in the new label is blank, add a dot.
+// if (newLabel.charAt(newLabel.length()-1) != ' ') {
+// newLabel = newLabel + ".";
+// }
+// Integer newNumber;
+// Integer oldNumber = (Integer) substringToNumberMap.get(newLabel);
+//
+// if (oldNumber != null) {
+// newNumber = new Integer(oldNumber.intValue() + 1);
+// } else {
+// newNumber = new Integer(1);
+// }
+//
+// substringToNumberMap.put(newLabel,newNumber);
+//
+// if (foundNumber) {
+// int newNumVal = newNumber.intValue();
+// int numOnLabel = Integer.parseInt(label.substring(lastIndex+1));
+//
+// if (numOnLabel < newNumVal && getModelForLabel(newLabel + numOnLabel) == null) {
+// return newLabel + numOnLabel;
+// }
+// }
+//
+// newLabel = newLabel + newNumber;
+//
+// return newLabel;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 485
http://cishell.svn.sourceforge.net/cishell/?rev=485&view=rev
Author: mwlinnem
Date: 2007-08-17 12:47:55 -0700 (Fri, 17 Aug 2007)
Log Message:
-----------
Removed unnecessary import.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java
Modified: trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java 2007-08-17 19:47:06 UTC (rev 484)
+++ trunk/testing/org.cishell.testing.convertertester.algorithm/src/org/cishell/testing/convertertester/algorithm/ConverterTesterAlgorithmFactory.java 2007-08-17 19:47:55 UTC (rev 485)
@@ -9,7 +9,6 @@
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.metatype.MetaTypeProvider;
-import org.osgi.service.metatype.MetaTypeService;
public class ConverterTesterAlgorithmFactory implements AlgorithmFactory {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-17 19:47:15
|
Revision: 484
http://cishell.svn.sourceforge.net/cishell/?rev=484&view=rev
Author: mwlinnem
Date: 2007-08-17 12:47:06 -0700 (Fri, 17 Aug 2007)
Log Message:
-----------
Cleaned up slightly.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-16 22:33:30 UTC (rev 483)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-17 19:47:06 UTC (rev 484)
@@ -15,7 +15,6 @@
public class TestFileKeeper {
- //TODO: How should we expose this to the user?
static {
String fs = File.separator;
DEFAULT_ROOT_DIR =
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-16 22:33:30 UTC (rev 483)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-17 19:47:06 UTC (rev 484)
@@ -110,16 +110,6 @@
}
// String summary = "%" + percentSuccessful + " Successful";
- String reportNamePrefix = "";
- if (tr.allSucceeded()) {
- reportNamePrefix = "Successful";
- } else if (tr.someSucceeded()) {
- reportNamePrefix = "Partially Successful";
- } else {
- reportNamePrefix = "Failed";
- }
-
-
String summary = "";
this.testReport = new TestReport(reportFile, tr.getFullName(),
new FilePassReport[0],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 483
http://cishell.svn.sourceforge.net/cishell/?rev=483&view=rev
Author: mwlinnem
Date: 2007-08-16 15:33:30 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
Added comment to readme report.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-16 22:25:41 UTC (rev 482)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-16 22:33:30 UTC (rev 483)
@@ -12,6 +12,10 @@
private ReadMeReport readme;
+ /**
+ * Instead of actually generating the report in-line, we just
+ * load a file with the report text inside it, and return it as is.
+ */
public void generateReport(AllTestsResult atr) {
String readmePath = TestFileKeeper.DEFAULT_ROOT_DIR + "ReportREADME.txt";
System.out.println("ReadMe path is: " + readmePath);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 482
http://cishell.svn.sourceforge.net/cishell/?rev=482&view=rev
Author: mwlinnem
Date: 2007-08-16 15:25:41 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
Oops. Readme Report path was wrong.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-16 22:20:00 UTC (rev 481)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/readme/ReadMeReportGenerator.java 2007-08-16 22:25:41 UTC (rev 482)
@@ -13,9 +13,7 @@
private ReadMeReport readme;
public void generateReport(AllTestsResult atr) {
- //TODO: TOTAL HACK, CHANCE AS SOON AS POSSIBLE
- String readmePath = (System.getProperty("user.home") + File.separator +
- TestFileKeeper.DEFAULT_ROOT_DIR + "ReportREADME.txt");
+ String readmePath = TestFileKeeper.DEFAULT_ROOT_DIR + "ReportREADME.txt";
System.out.println("ReadMe path is: " + readmePath);
File readmeFile = new File(readmePath);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 481
http://cishell.svn.sourceforge.net/cishell/?rev=481&view=rev
Author: mwlinnem
Date: 2007-08-16 15:20:00 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
Removed extraneous file separator.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-16 22:13:37 UTC (rev 480)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/TestFileKeeper.java 2007-08-16 22:20:00 UTC (rev 481)
@@ -18,16 +18,9 @@
//TODO: How should we expose this to the user?
static {
String fs = File.separator;
-
-//Replaced by Bonnie
-/* DEFAULT_ROOT_DIR = "My Documents"+fs+"workspace" + fs + "org.cishell."
- + "testing.convertertester.core.new" + fs + "src" + fs +
- "org" + fs + "cishell" + fs + "testing" + fs +
- "convertertester" + fs + "core" + fs + "test_files" + fs;
-*/
- System.out.println("osgi.install.area:"+System.getProperty("osgi.install.area"));
-
- DEFAULT_ROOT_DIR = System.getProperty("osgi.install.area").replace("file:","") + fs + "converter_test_files" + fs;
+ DEFAULT_ROOT_DIR =
+ System.getProperty("osgi.install.area").
+ replace("file:","") + "converter_test_files" + fs;
}
public static final String DEFAULT_ROOT_DIR;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mwl...@us...> - 2007-08-16 22:13:39
|
Revision: 480
http://cishell.svn.sourceforge.net/cishell/?rev=480&view=rev
Author: mwlinnem
Date: 2007-08-16 15:13:37 -0700 (Thu, 16 Aug 2007)
Log Message:
-----------
Revised how Test Reports are named. Converter Reports now contain names of tests they are involved in.
Modified Paths:
--------------
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-16 22:10:02 UTC (rev 479)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/ConverterTester2.java 2007-08-16 22:13:37 UTC (rev 480)
@@ -94,6 +94,8 @@
* and comparison converter path.
*/
+ int numTestsSoFar = 0;
+
Iterator iter = fileFormats.iterator();
while(iter.hasNext()) {
String fileFormat = (String) iter.next();
@@ -113,10 +115,12 @@
*/
for (int kk = 0; kk < testConvs.length; kk++) {
+ numTestsSoFar++;
ConverterPath testConv = testConvs[kk];
TestResult testResult =
- runATest(testConv, compareConv, cContext, bContext);
+ runATest(testConv, compareConv, cContext, bContext,
+ numTestsSoFar);
if (testResult != null) {
testResults.add(testResult);
@@ -130,7 +134,7 @@
private TestResult runATest(ConverterPath testConvs,
ConverterPath compareConvs, CIShellContext cContext,
- BundleContext bContext) {
+ BundleContext bContext, int numTestsSoFar) {
//get test file data corresponding to the format these converters accept.
@@ -154,7 +158,8 @@
FilePassResult[] results = this.testRunner.runTest(testBasicData);
//return the results of the test
- return new TestResult(results, testConvs, compareConvs);
+ String testName = "Test " + numTestsSoFar;
+ return new TestResult(results, testConvs, compareConvs, testName);
}
private Data[][] wrapInData(String[] testFilePaths, String format) {
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-16 22:10:02 UTC (rev 479)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/allconvs/ConvReportSubGenerator.java 2007-08-16 22:13:37 UTC (rev 480)
@@ -11,6 +11,7 @@
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.ConvReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.reports.TestReport;
import org.cishell.testing.convertertester.core.tester2.reportgen.results.ConvResult;
+import org.cishell.testing.convertertester.core.tester2.reportgen.results.TestResult;
import org.osgi.framework.ServiceReference;
public class ConvReportSubGenerator {
@@ -52,6 +53,14 @@
report.println("");
+ report.println("Involved in the following tests...");
+ TestResult[] involvedTests = cr.getTests();
+ for (int ii = 0; ii < involvedTests.length; ii++) {
+ TestResult tr = involvedTests[ii];
+ report.println(" " + tr.getFullName());
+ }
+ report.println("");
+
String[] failureExps = cr.getUniqueFailureExplanations();
if (failureExps.length > 0) {
report.println("Unique Failure Explanations...");
@@ -81,7 +90,6 @@
.getName(), summary);
report.println("");
report.flush();
-
reportOutStream.close();
} catch (IOException e) {
System.out.println("Unable to generate a converter report.");
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-16 22:10:02 UTC (rev 479)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/AllTestsReportGenerator.java 2007-08-16 22:13:37 UTC (rev 480)
@@ -50,21 +50,14 @@
atr.getNumTests());
report.println("");
- float percentCompletelyPassed = atr.getNumTestsPassed() / (atr.getNumTests());
+ float percentCompletelyPassed =
+ atr.getNumTestsPassed() / (atr.getNumTests());
- TestResult[] allTRs = atr.getAllTestResults();
- for (int ii = 0; ii < allTRs.length; ii++) {
- TestResult tr = allTRs[ii];
- tr.setName("Test");
- }
-
TestResult[] passedTRs = atr.getPassedTestResults();
report.println("Completely Passed Tests...");
for (int ii = 0; ii < passedTRs.length; ii++) {
TestResult passedTR = passedTRs[ii];
- passedTR.setName("Successful " + passedTR.getName() +
- " " + ii);
- report.println(" " + passedTR.getName());
+ report.println(" " + passedTR.getFullName());
}
report.println("");
@@ -72,9 +65,7 @@
report.println("Partially Passed Tests...");
for (int ii = 0; ii < pPassedTRs.length; ii++) {
TestResult pPassedTR = pPassedTRs[ii];
- pPassedTR.setName("Partially Successful " +
- pPassedTR.getName() + " " + ii);
- report.println(" " + pPassedTR.getName());
+ report.println(" " + pPassedTR.getFullName());
}
report.println("");
@@ -83,10 +74,7 @@
TestResult[] failedTRs = atr.getFailedTestResults();
for (int ii = 0; ii < failedTRs.length; ii++) {
TestResult failedTR = failedTRs[ii];
-
- failedTR.setName("Failed " + failedTR.getName()
- + " " + ii);
- report.println(" " + failedTR.getName());
+ report.println(" " + failedTR.getFullName());
}
report.println("");
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-16 22:10:02 UTC (rev 479)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/alltests/TestReportSubGenerator.java 2007-08-16 22:13:37 UTC (rev 480)
@@ -110,8 +110,18 @@
}
// String summary = "%" + percentSuccessful + " Successful";
+ String reportNamePrefix = "";
+ if (tr.allSucceeded()) {
+ reportNamePrefix = "Successful";
+ } else if (tr.someSucceeded()) {
+ reportNamePrefix = "Partially Successful";
+ } else {
+ reportNamePrefix = "Failed";
+ }
+
+
String summary = "";
- this.testReport = new TestReport(reportFile, tr.getName(),
+ this.testReport = new TestReport(reportFile, tr.getFullName(),
new FilePassReport[0],
new FilePassReport[0],
// (FilePassReport[]) successfulFPReports.toArray(new FilePassReport[0]),
Modified: trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java
===================================================================
--- trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java 2007-08-16 22:10:02 UTC (rev 479)
+++ trunk/testing/org.cishell.testing.convertertester.core.new/src/org/cishell/testing/convertertester/core/tester2/reportgen/results/TestResult.java 2007-08-16 22:13:37 UTC (rev 480)
@@ -24,10 +24,12 @@
private boolean cachedSuccesses = false;
private boolean[] successes;
- public TestResult(FilePassResult[] fprs, ConverterPath testConvs, ConverterPath compareConvs) {
+ public TestResult(FilePassResult[] fprs, ConverterPath testConvs,
+ ConverterPath compareConvs, String name) {
this.fprs = fprs;
this.testConvs = testConvs;
this.compareConvs = compareConvs;
+ this.name = name;
this.successes = new boolean[fprs.length];
@@ -60,13 +62,13 @@
return fprs;
}
- public String getShortSummary() {
+ public String getSummary() {
if (allSucceeded()) {
- return "Success";
+ return "Successful";
} else if (someSucceeded()) {
- return "Partial Success";
+ return "Partially Successful";
} else {
- return "Failure";
+ return "Failed";
}
}
@@ -90,14 +92,14 @@
return this.fprs.length;
}
- public void setName(String name) {
- this.name = name;
- }
-
public String getName() {
return this.name;
}
+ public String getFullName() {
+ return getSummary() + " " + getName();
+ }
+
public String getFormat() {
return this.format;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|