/hg/MauveTestCoverage: 2012-01-27 Pavel Tisnovsky <ptisnovs at re...
ptisnovs at icedtea.classpath.org
ptisnovs at icedtea.classpath.org
Fri Jan 27 07:33:07 PST 2012
changeset 342d366654ce in /hg/MauveTestCoverage
details: http://icedtea.classpath.org/hg/MauveTestCoverage?cmd=changeset;node=342d366654ce
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Fri Jan 27 16:35:26 2012 +0100
2012-01-27 Pavel Tisnovsky <ptisnovs at redhat.com>
* templates/style.css: New styles added which is
used in generated test report.
* src/FileUtils.java:
* src/PrintClassList.java:
* src/PrintPublicMethods.java:
* src/PrintTestCoverage.java: Minor changes - JavaDoc
* templates/all_classes_template.html:
* templates/all_packages_template.html:
* templates/class_template.html:
* templates/package_template.html:
* templates/summary.html: Removed useless character ^M in the
XML declarations.
diffstat:
ChangeLog | 16 ++++++++++
src/FileUtils.java | 5 +++
src/PrintClassList.java | 1 +
src/PrintPublicMethods.java | 7 ++++
src/PrintTestCoverage.java | 55 ++++++++++++++++++++++++++++++++++++
templates/all_classes_template.html | 2 +-
templates/all_packages_template.html | 2 +-
templates/class_template.html | 2 +-
templates/package_template.html | 2 +-
templates/style.css | 25 ++++++++++++++++
templates/summary.html | 2 +-
11 files changed, 114 insertions(+), 5 deletions(-)
diffs (331 lines):
diff -r 5849d5bfbee0 -r 342d366654ce ChangeLog
--- a/ChangeLog Wed Jan 18 16:52:43 2012 +0100
+++ b/ChangeLog Fri Jan 27 16:35:26 2012 +0100
@@ -1,3 +1,19 @@
+2012-01-27 Pavel Tisnovsky <ptisnovs at redhat.com>
+
+ * templates/style.css:
+ New styles added which is used in generated test report.
+ * src/FileUtils.java:
+ * src/PrintClassList.java:
+ * src/PrintPublicMethods.java:
+ * src/PrintTestCoverage.java:
+ Minor changes - JavaDoc
+ * templates/all_classes_template.html:
+ * templates/all_packages_template.html:
+ * templates/class_template.html:
+ * templates/package_template.html:
+ * templates/summary.html:
+ Removed useless character ^M in the XML declarations.
+
2012-01-18 Pavel Tisnovsky <ptisnovs at redhat.com>
* templates/class_template.html:
diff -r 5849d5bfbee0 -r 342d366654ce src/FileUtils.java
--- a/src/FileUtils.java Wed Jan 18 16:52:43 2012 +0100
+++ b/src/FileUtils.java Fri Jan 27 16:35:26 2012 +0100
@@ -164,6 +164,7 @@
// try to close the buffered reader
try
{
+ // for the easier use, it is possible to call this method with null parameter
if (bufferedReader != null)
{
bufferedReader.close();
@@ -186,6 +187,7 @@
// try to close the buffered writer
try
{
+ // for the easier use, it is possible to call this method with null parameter
if (bufferedWriter != null)
{
bufferedWriter.close();
@@ -249,6 +251,7 @@
*/
static int readOneByte(FileInputStream fileInputStream) throws IOException
{
+ // try to read one byte from the input stream
int i = fileInputStream.read();
// -1 means that EOF is reached
if (i == EOF)
@@ -269,6 +272,7 @@
*/
static int readTwoBytes(FileInputStream fileInputStream) throws IOException
{
+ // try to read two bytes from the input stream
int i1 = readOneByte(fileInputStream);
int i2 = readOneByte(fileInputStream);
// combine all two read bytes into a word
@@ -286,6 +290,7 @@
*/
static int readFourBytes(FileInputStream fileInputStream) throws IOException
{
+ // try to read four bytes from the input stream
int i1 = readOneByte(fileInputStream);
int i2 = readOneByte(fileInputStream);
int i3 = readOneByte(fileInputStream);
diff -r 5849d5bfbee0 -r 342d366654ce src/PrintClassList.java
--- a/src/PrintClassList.java Wed Jan 18 16:52:43 2012 +0100
+++ b/src/PrintClassList.java Fri Jan 27 16:35:26 2012 +0100
@@ -117,6 +117,7 @@
jarFile.close();
}
catch (IOException e) {
+ // oops, something wrong happens
e.printStackTrace();
}
}
diff -r 5849d5bfbee0 -r 342d366654ce src/PrintPublicMethods.java
--- a/src/PrintPublicMethods.java Wed Jan 18 16:52:43 2012 +0100
+++ b/src/PrintPublicMethods.java Fri Jan 27 16:35:26 2012 +0100
@@ -72,17 +72,22 @@
}
// some exceptions could be thrown by Class.forName()
catch (ClassNotFoundException e) {
+ // it might happen
return null;
}
catch (UnsatisfiedLinkError e) {
+ // it might happen
return null;
}
catch (ExceptionInInitializerError e) {
+ // it might happen
return null;
}
catch (NoClassDefFoundError e) {
+ // it might happen
return null;
}
+ // it is not a class at all or the class is not public
return null;
}
@@ -221,6 +226,7 @@
*/
private static void printAllConstructors(String className)
{
+ // iterate over all constructors
for (String methodSignature : getAllConstructors(className))
{
System.out.println(methodSignature);
@@ -235,6 +241,7 @@
*/
private static void printAllPublicMethods(String className)
{
+ // iterate over all public methods
for (String methodSignature : getAllPublicMethodsForClass(className))
{
System.out.println(methodSignature);
diff -r 5849d5bfbee0 -r 342d366654ce src/PrintTestCoverage.java
--- a/src/PrintTestCoverage.java Wed Jan 18 16:52:43 2012 +0100
+++ b/src/PrintTestCoverage.java Fri Jan 27 16:35:26 2012 +0100
@@ -176,6 +176,11 @@
abstract public String toString(ConstantPoolRecord[] poolEntries);
}
+/**
+ * Class representing class record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
class ClassRecord extends ConstantPoolRecord
{
private int classNameIndex;
@@ -217,6 +222,11 @@
}
}
+/**
+ * Class representing field reference record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
class FieldReferenceRecord extends ConstantPoolRecord
{
private int classIndex;
@@ -269,6 +279,11 @@
}
}
+/**
+ * Class representing method reference record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
@SuppressWarnings("boxing")
class MethodReferenceRecord extends ConstantPoolRecord
{
@@ -426,6 +441,11 @@
}
}
+/**
+ * Class representing interface record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
class InterfaceReferenceRecord extends ConstantPoolRecord
{
public int classIndex;
@@ -468,6 +488,11 @@
}
}
+/**
+ * Class representing name and type record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
class NameAndTypeRecord extends ConstantPoolRecord
{
public int nameIndex;
@@ -508,6 +533,11 @@
}
}
+/**
+ * Class representing string record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
class StringRecord extends ConstantPoolRecord
{
public int stringIndex;
@@ -539,6 +569,11 @@
}
}
+/**
+ * Class representing integer constant record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
class IntegerRecord extends ConstantPoolRecord
{
public int integerConstant;
@@ -563,6 +598,11 @@
}
}
+/**
+ * Class representing long constant record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
class LongRecord extends ConstantPoolRecord
{
public long longConstant;
@@ -587,6 +627,11 @@
}
}
+/**
+ * Class representing float constant record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
class FloatRecord extends ConstantPoolRecord
{
public float floatConstant;
@@ -611,6 +656,11 @@
}
}
+/**
+ * Class representing double constant record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
class DoubleRecord extends ConstantPoolRecord
{
public double doubleConstant;
@@ -636,6 +686,11 @@
}
}
+/**
+ * Class representing UTF-8 string record stored in constant pool.
+ *
+ * @author Pavel Tisnovsky
+ */
class Utf8Record extends ConstantPoolRecord
{
public String string;
diff -r 5849d5bfbee0 -r 342d366654ce templates/all_classes_template.html
--- a/templates/all_classes_template.html Wed Jan 18 16:52:43 2012 +0100
+++ b/templates/all_classes_template.html Fri Jan 27 16:35:26 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
diff -r 5849d5bfbee0 -r 342d366654ce templates/all_packages_template.html
--- a/templates/all_packages_template.html Wed Jan 18 16:52:43 2012 +0100
+++ b/templates/all_packages_template.html Fri Jan 27 16:35:26 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
diff -r 5849d5bfbee0 -r 342d366654ce templates/class_template.html
--- a/templates/class_template.html Wed Jan 18 16:52:43 2012 +0100
+++ b/templates/class_template.html Fri Jan 27 16:35:26 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
diff -r 5849d5bfbee0 -r 342d366654ce templates/package_template.html
--- a/templates/package_template.html Wed Jan 18 16:52:43 2012 +0100
+++ b/templates/package_template.html Fri Jan 27 16:35:26 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
diff -r 5849d5bfbee0 -r 342d366654ce templates/style.css
--- a/templates/style.css Wed Jan 18 16:52:43 2012 +0100
+++ b/templates/style.css Fri Jan 27 16:35:26 2012 +0100
@@ -25,3 +25,28 @@
.method-name {}
.method-params {}
+table.package_list {
+ border-width: 0px;
+ border-spacing: 0px;
+ border-style: dashed;
+ border-color: black;
+ border-collapse: collapse;
+ background-color: white;
+ width: 100%;
+}
+table.package_list th {
+ border-width: 1px;
+ padding: 1px;
+ border-style: inset;
+ border-color: gray;
+ background-color: #c0c0ff;
+ -moz-border-radius: ;
+}
+table.package_list td {
+ border-width: 1px;
+ padding: 1px;
+ border-style: inset;
+ border-color: gray;
+ -moz-border-radius: ;
+}
+
diff -r 5849d5bfbee0 -r 342d366654ce templates/summary.html
--- a/templates/summary.html Wed Jan 18 16:52:43 2012 +0100
+++ b/templates/summary.html Fri Jan 27 16:35:26 2012 +0100
@@ -1,4 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
More information about the distro-pkg-dev
mailing list