|
From: <ls...@us...> - 2009-01-31 09:52:57
|
Revision: 4932
http://jnode.svn.sourceforge.net/jnode/?rev=4932&view=rev
Author: lsantha
Date: 2009-01-31 09:52:51 +0000 (Sat, 31 Jan 2009)
Log Message:
-----------
Fixed code style.
Modified Paths:
--------------
trunk/core/src/test/org/jtestserver/tests/TestVMware.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogNode.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/AbstractNode.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/AbstractNodeRecord.java
trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafRecord.java
trunk/shell/src/test/org/jnode/test/shell/harness/ClassTestRunner.java
trunk/shell/src/test/org/jnode/test/shell/harness/CommandTestRunner.java
trunk/shell/src/test/org/jnode/test/shell/harness/PluginSpecification.java
trunk/shell/src/test/org/jnode/test/shell/harness/ScriptTestRunner.java
trunk/shell/src/test/org/jnode/test/shell/harness/TestCommandShell.java
trunk/shell/src/test/org/jnode/test/shell/harness/TestHarness.java
trunk/shell/src/test/org/jnode/test/shell/harness/TextContent.java
Modified: trunk/core/src/test/org/jtestserver/tests/TestVMware.java
===================================================================
--- trunk/core/src/test/org/jtestserver/tests/TestVMware.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/core/src/test/org/jtestserver/tests/TestVMware.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -28,7 +28,6 @@
import org.jtestserver.client.process.vmware.VMware;
import org.jtestserver.client.process.vmware.VMwareConfig;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
public class TestVMware extends TestVmManager {
@@ -36,12 +35,12 @@
public void setUp() throws IOException {
Config config = new CustomConfigReader(ConfigReader.VMWARE_TYPE).readConfig();
VMwareConfig vmwareConfig = (VMwareConfig) config.getVMConfig();
-
+
vmManager = new VMware(vmwareConfig);
- vmName = vmwareConfig.getVmName();
+ vmName = vmwareConfig.getVmName();
}
-
- @Test(expected = IOException.class)
+
+ @Test(expected = IOException.class)
public void testGetRunningVMsWithWrongAuthentification() throws IOException {
CustomConfigReader reader = new CustomConfigReader(ConfigReader.VMWARE_TYPE) {
@Override
@@ -49,14 +48,14 @@
throws IOException {
vmProperties.put(VMwareConfig.USERNAME, "anObviouslyWrongLogin");
vmProperties.put(VMwareConfig.PASSWORD, "ThisIsNotAValidPassword");
-
+
return super.createVMConfig(vmProperties, vm);
}
};
-
+
Config config = reader.readConfig();
VMwareConfig vmwareConfig = (VMwareConfig) config.getVMConfig();
-
+
VMware vmware = new VMware(vmwareConfig);
vmware.getRunningVMs();
}
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/Catalog.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -16,16 +16,19 @@
import org.jnode.fs.hfsplus.tree.IndexRecord;
import org.jnode.fs.hfsplus.tree.LeafRecord;
import org.jnode.fs.hfsplus.tree.NodeDescriptor;
-import org.jnode.fs.hfsplus.tree.NodeRecord;
import org.jnode.util.ByteBufferUtils;
public class Catalog {
-
+
private final Logger log = Logger.getLogger(getClass());
private HfsPlusFileSystem fs;
- /** B-Tree node descriptor */
+ /**
+ * B-Tree node descriptor
+ */
private NodeDescriptor btnd;
- /** B-Tree Header record */
+ /**
+ * B-Tree Header record
+ */
private BTHeaderRecord bthr;
/** */
private int catalogHeaderNodeOffset;
@@ -34,9 +37,8 @@
/**
* Create Catalog based on meta-data that exist on the file system.
- *
+ *
* @param fs HFS+ file system that contains catalog informations.
- *
* @throws IOException
*/
public Catalog(final HfsPlusFileSystem fs) throws IOException {
@@ -46,27 +48,27 @@
ExtentDescriptor firstExtent = sb.getCatalogFile().getExtents()[0];
catalogHeaderNodeOffset = firstExtent.getStartBlock() * sb.getBlockSize();
if (firstExtent.getStartBlock() != 0 && firstExtent.getBlockCount() != 0) {
- buffer = ByteBuffer.allocate(NodeDescriptor.BT_NODE_DESCRIPTOR_LENGTH
- + BTHeaderRecord.BT_HEADER_RECORD_LENGTH);
+ buffer = ByteBuffer.allocate(NodeDescriptor.BT_NODE_DESCRIPTOR_LENGTH
+ + BTHeaderRecord.BT_HEADER_RECORD_LENGTH);
fs.getApi().read(catalogHeaderNodeOffset, buffer);
buffer.rewind();
byte[] data = ByteBufferUtils.toArray(buffer);
btnd = new NodeDescriptor(data, 0);
bthr = new BTHeaderRecord(data, NodeDescriptor.BT_NODE_DESCRIPTOR_LENGTH);
-
+
}
}
-
+
/**
* Create new Catalog
- *
+ *
* @param params
*/
public Catalog(HFSPlusParams params) {
log.debug("Create B-Tree catalog file.\n");
-
+
int nodeSize = params.getCatalogNodeSize();
-
+
int bufferLength = 0;
btnd = new NodeDescriptor();
btnd.setKind(HfsPlusConstants.BT_HEADER_NODE);
@@ -108,7 +110,7 @@
offset = offset + ck.getKeyLength() + CatalogFolder.CATALOG_FOLDER_SIZE;
CatalogKey tck = new CatalogKey(CatalogNodeId.HFSPLUS_ROOT_CNID, name);
CatalogThread ct = new CatalogThread(HfsPlusConstants.RECORD_TYPE_FOLDER_THREAD,
- CatalogNodeId.HFSPLUS_ROOT_CNID, new HFSUnicodeString(""));
+ CatalogNodeId.HFSPLUS_ROOT_CNID, new HFSUnicodeString(""));
record = new LeafRecord(tck, ct.getBytes());
rootNode.addNodeRecord(1, record, offset);
buffer = ByteBuffer.allocate(bufferLength + bthr.getNodeSize());
@@ -118,9 +120,8 @@
buffer.put(rootNode.getBytes());
buffer.rewind();
}
-
+
/**
- *
* @param parentID
* @return
* @throws IOException
@@ -136,7 +137,7 @@
byte[] data = ByteBufferUtils.toArray(nodeData);
CatalogNode node = new CatalogNode(data, nodeSize);
while (node.isIndexNode()) {
- IndexRecord record = (IndexRecord)node.find(parentID);
+ IndexRecord record = (IndexRecord) node.find(parentID);
currentOffset = catalogHeaderNodeOffset + (record.getIndex() * nodeSize);
nodeData = ByteBuffer.allocate(nodeSize);
fs.getApi().read(currentOffset, nodeData);
@@ -144,20 +145,18 @@
data = ByteBufferUtils.toArray(nodeData);
node = new CatalogNode(data, nodeSize);
}
-
+
if (node.isLeafNode()) {
- lr = (LeafRecord)node.find(parentID);
+ lr = (LeafRecord) node.find(parentID);
}
return lr;
}
/**
* Find leaf records corresponding to parentID. The search begin at the root node of the tree.
- *
+ *
* @param parentID Parent node id
- *
* @return Array of LeafRecord
- *
* @throws IOException
*/
public final LeafRecord[] getRecords(final CatalogNodeId parentID)
@@ -166,14 +165,12 @@
}
/**
- * Find leaf records corresponding to parentID. The search begin at the node correspding
+ * Find leaf records corresponding to parentID. The search begin at the node correspding
* to the index passed as parameter.
- *
- * @param parentID Parent node id
+ *
+ * @param parentID Parent node id
* @param nodeNumber Index of node where the search begin.
- *
* @return Array of LeafRecord
- *
* @throws IOException
*/
public final LeafRecord[] getRecords(final CatalogNodeId parentID, final int nodeNumber)
@@ -185,7 +182,7 @@
fs.getApi().read(catalogHeaderNodeOffset + (currentNodeNumber * nodeSize), nodeData);
CatalogNode node = new CatalogNode(nodeData.array(), nodeSize);
if (node.isIndexNode()) {
- IndexRecord[] records = (IndexRecord[])node.findChilds(parentID);
+ IndexRecord[] records = (IndexRecord[]) node.findChilds(parentID);
List<LeafRecord> lfList = new LinkedList<LeafRecord>();
for (IndexRecord rec : records) {
LeafRecord[] lfr = getRecords(parentID, rec.getIndex());
@@ -195,7 +192,7 @@
}
return lfList.toArray(new LeafRecord[lfList.size()]);
} else if (node.isLeafNode()) {
- return (LeafRecord[])node.findAll(parentID);
+ return (LeafRecord[]) node.findAll(parentID);
} else {
return null;
}
@@ -207,7 +204,6 @@
}
/**
- *
* @param parentID
* @param nodeName
* @return
@@ -223,7 +219,7 @@
int currentOffset = 0;
CatalogKey cKey = new CatalogKey(parentID, nodeName);
while (node.isIndexNode()) {
- IndexRecord record = (IndexRecord)node.find(cKey);
+ IndexRecord record = (IndexRecord) node.find(cKey);
currentNodeNumber = record.getIndex();
currentOffset = catalogHeaderNodeOffset + record.getIndex() * nodeSize;
nodeData = ByteBuffer.allocate(nodeSize);
@@ -232,7 +228,7 @@
}
LeafRecord lr = null;
if (node.isLeafNode()) {
- lr = (LeafRecord)node.find(parentID);
+ lr = (LeafRecord) node.find(parentID);
}
return lr;
}
@@ -244,9 +240,9 @@
public final BTHeaderRecord getBTHeaderRecord() {
return bthr;
}
-
+
public ByteBuffer getBytes() {
return buffer;
}
-
+
}
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogNode.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogNode.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/catalog/CatalogNode.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -30,7 +30,7 @@
int recordSize = offset2 - offset;
NodeRecord record = null;
Key key = new CatalogKey(datas, offset);
- if(isIndexNode()){
+ if (isIndexNode()) {
record = new IndexRecord(key, datas, offset);
} else {
record = new LeafRecord(key, datas, offset, recordSize);
@@ -39,7 +39,6 @@
}
/**
- *
* @param parentId
* @return
*/
@@ -57,7 +56,6 @@
}
/**
- *
* @param key
* @return
*/
@@ -66,7 +64,7 @@
for (int index = 0; index < this.getNodeDescriptor().getNumRecords(); index++) {
NodeRecord record = this.getNodeRecord(index);
if ((record.getKey().compareTo(key) <= 0)
- && (record.getKey().compareTo(largestMatchingRecord.getKey()) > 0)) {
+ && (record.getKey().compareTo(largestMatchingRecord.getKey()) > 0)) {
largestMatchingRecord = record;
}
}
@@ -74,7 +72,6 @@
}
/**
- *
* @param parentId
* @return
*/
@@ -86,7 +83,7 @@
NodeRecord record = this.getNodeRecord(index);
CatalogKey key = (CatalogKey) record.getKey();
if (key.getParentId().getId() < parentId.getId()
- && (largestMatchingKey == null || key.compareTo(largestMatchingKey) > 0)) {
+ && (largestMatchingKey == null || key.compareTo(largestMatchingKey) > 0)) {
largestMatchingKey = key;
largestMatchingRecord = record;
} else if (key.getParentId().getId() == parentId.getId()) {
@@ -101,7 +98,6 @@
}
/**
- *
* @param parentId
* @return
*/
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/AbstractNode.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/AbstractNode.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/AbstractNode.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -4,7 +4,7 @@
import org.jnode.util.BigEndian;
public abstract class AbstractNode implements Node {
-
+
protected byte[] datas;
protected int size;
@@ -12,15 +12,15 @@
public NodeDescriptor getNodeDescriptor() {
return new NodeDescriptor(datas, 0);
}
-
- public boolean isIndexNode(){
+
+ public boolean isIndexNode() {
return this.getNodeDescriptor().getKind() == HfsPlusConstants.BT_INDEX_NODE;
}
-
- public boolean isLeafNode(){
+
+ public boolean isLeafNode() {
return this.getNodeDescriptor().getKind() == HfsPlusConstants.BT_LEAF_NODE;
}
-
+
@Override
public int getRecordOffset(int index) {
return BigEndian.getInt16(datas, size - ((index + 1) * 2));
@@ -28,14 +28,14 @@
@Override
public abstract NodeRecord getNodeRecord(int index);
-
+
@Override
public void addNodeRecord(int index, NodeRecord record, int offset) {
BigEndian.setInt16(datas, size - ((index + 1) * 2), offset);
System.arraycopy(record.getBytes(), 0, datas, offset, record.getSize());
}
-
- public byte[] getBytes(){
+
+ public byte[] getBytes() {
return datas;
}
}
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/AbstractNodeRecord.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/AbstractNodeRecord.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/AbstractNodeRecord.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -1,21 +1,21 @@
package org.jnode.fs.hfsplus.tree;
public abstract class AbstractNodeRecord implements NodeRecord {
-
+
protected Key key = null;
protected byte[] recordData = null;
-
+
public Key getKey() {
return key;
}
-
+
public byte[] getData() {
return recordData;
}
-
- public int getSize(){
+
+ public int getSize() {
return key.getKeyLength() + recordData.length;
}
-
+
public abstract byte[] getBytes();
}
Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafRecord.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafRecord.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/fs/src/fs/org/jnode/fs/hfsplus/tree/LeafRecord.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -3,13 +3,13 @@
import org.jnode.util.BigEndian;
public class LeafRecord extends AbstractNodeRecord {
-
- public LeafRecord(final Key key, final byte[] recordData){
+
+ public LeafRecord(final Key key, final byte[] recordData) {
this.key = key;
this.recordData = new byte[recordData.length];
- System.arraycopy(recordData,0, this.recordData, 0, recordData.length);
+ System.arraycopy(recordData, 0, this.recordData, 0, recordData.length);
}
-
+
public LeafRecord(final Key key, final byte[] nodeData, final int offset, final int recordDataSize) {
this.key = key;
this.recordData = new byte[recordDataSize];
@@ -27,9 +27,9 @@
System.arraycopy(data, key.getKeyLength(), this.recordData, 0, this.recordData.length);
return data;
}
-
+
public final String toString() {
return "Type : " + getType() + "\nKey : " + getKey().toString() + "\n";
}
-
+
}
Modified: trunk/shell/src/test/org/jnode/test/shell/harness/ClassTestRunner.java
===================================================================
--- trunk/shell/src/test/org/jnode/test/shell/harness/ClassTestRunner.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/shell/src/test/org/jnode/test/shell/harness/ClassTestRunner.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -28,17 +28,17 @@
/**
* This TestRunner runs a a class by calling its 'static void main(Sting[])' entry
* point. Note that classes that call System.exit(status) are problematic.
- *
+ *
* @author cr...@jn...
*/
class ClassTestRunner implements TestRunnable {
private ByteArrayOutputStream outBucket;
private ByteArrayOutputStream errBucket;
-
+
private final TestSpecification spec;
private final TestHarness harness;
-
+
public ClassTestRunner(TestSpecification spec, TestHarness harness) {
this.spec = spec;
this.harness = harness;
@@ -55,11 +55,11 @@
private boolean check() {
// When a class is run this way we cannot capture the RC.
- return
+ return
harness.expect(outBucket.toString(), spec.getOutputContent(), "output content") &
- harness.expect(errBucket.toString(), spec.getErrorContent(), "err content");
+ harness.expect(errBucket.toString(), spec.getErrorContent(), "err content");
}
-
+
@Override
public void cleanup() {
}
@@ -72,5 +72,5 @@
System.setOut(new PrintStream(outBucket));
System.setErr(new PrintStream(errBucket));
}
-
-}
\ No newline at end of file
+
+}
Modified: trunk/shell/src/test/org/jnode/test/shell/harness/CommandTestRunner.java
===================================================================
--- trunk/shell/src/test/org/jnode/test/shell/harness/CommandTestRunner.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/shell/src/test/org/jnode/test/shell/harness/CommandTestRunner.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -30,15 +30,15 @@
/**
* This TestRunner runs a class by calling its 'static void main(String[])' entry
* point. Note that classes that call System.exit(status) are problematic.
- *
+ *
* @author cr...@jn...
*/
class CommandTestRunner extends JNodeTestRunnerBase implements TestRunnable {
private ByteArrayOutputStream outBucket;
private ByteArrayOutputStream errBucket;
-
-
+
+
public CommandTestRunner(TestSpecification spec, TestHarness harness) {
super(spec, harness);
}
@@ -56,12 +56,12 @@
}
private boolean check(int rc) {
- return
+ return
harness.expect(rc, spec.getRc(), "return code") &
- harness.expect(outBucket.toString(), spec.getOutputContent(), "output content") &
- harness.expect(errBucket.toString(), spec.getErrorContent(), "err content");
+ harness.expect(outBucket.toString(), spec.getOutputContent(), "output content") &
+ harness.expect(errBucket.toString(), spec.getErrorContent(), "err content");
}
-
+
@Override
public void cleanup() {
}
@@ -74,5 +74,5 @@
System.setOut(new PrintStream(outBucket));
System.setErr(new PrintStream(errBucket));
}
-
-}
\ No newline at end of file
+
+}
Modified: trunk/shell/src/test/org/jnode/test/shell/harness/PluginSpecification.java
===================================================================
--- trunk/shell/src/test/org/jnode/test/shell/harness/PluginSpecification.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/shell/src/test/org/jnode/test/shell/harness/PluginSpecification.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -22,16 +22,16 @@
/**
* This class holds a simple specification for a plugin required by a test or test set.
- *
+ *
* @author crawley@jnode
*/
public class PluginSpecification {
private final String pluginId;
private final String pluginVersion;
private final String pseudoPluginClassName;
-
+
public PluginSpecification(String pluginId, String pluginVersion,
- String pseudoPluginClassName) {
+ String pseudoPluginClassName) {
super();
this.pluginId = pluginId;
this.pluginVersion = pluginVersion;
@@ -47,13 +47,13 @@
}
/**
- * This method returns the classname of a 'pseudo plugin' class that can perform
+ * This method returns the classname of a 'pseudo plugin' class that can perform
* minimal plugin specific initialization when a plugin is 'required' in
* a context where Plugin loading is not possible.
- *
+ *
* @return the class name.
*/
public String getClassName() {
return pseudoPluginClassName;
}
-}
\ No newline at end of file
+}
Modified: trunk/shell/src/test/org/jnode/test/shell/harness/ScriptTestRunner.java
===================================================================
--- trunk/shell/src/test/org/jnode/test/shell/harness/ScriptTestRunner.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/shell/src/test/org/jnode/test/shell/harness/ScriptTestRunner.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -71,4 +71,4 @@
super.cleanup();
}
-}
\ No newline at end of file
+}
Modified: trunk/shell/src/test/org/jnode/test/shell/harness/TestCommandShell.java
===================================================================
--- trunk/shell/src/test/org/jnode/test/shell/harness/TestCommandShell.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/shell/src/test/org/jnode/test/shell/harness/TestCommandShell.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -35,20 +35,20 @@
import org.jnode.shell.io.NullOutputStream;
/**
- * This class extends CommandShell to modify the shell's stream resolution mechanism.
- * The modified resolveStream resolves in/out/err to streams that are supplied in the
- * constructor.
- *
+ * This class extends CommandShell to modify the shell's stream resolution mechanism.
+ * The modified resolveStream resolves in/out/err to streams that are supplied in the
+ * constructor.
+ *
* @author cr...@jn...
*/
public class TestCommandShell extends CommandShell {
-
+
private final CommandInput cin;
private final CommandOutput cout;
private final CommandOutput cerr;
- public TestCommandShell(InputStream in, PrintStream out, PrintStream err)
- throws ShellException {
+ public TestCommandShell(InputStream in, PrintStream out, PrintStream err)
+ throws ShellException {
super();
this.cin = new CommandInput(in);
this.cout = new CommandOutput(out);
Modified: trunk/shell/src/test/org/jnode/test/shell/harness/TestHarness.java
===================================================================
--- trunk/shell/src/test/org/jnode/test/shell/harness/TestHarness.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/shell/src/test/org/jnode/test/shell/harness/TestHarness.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -32,18 +32,18 @@
/**
* This is the entry point class for the command test harness. Its
* purpose is to run 'black box' tests on commands and the like.
- *
+ *
* @author crawley@jnode
*/
public class TestHarness {
// TODO - if someone feels motivated, they could replace the error
// reporting with something that generates (say) XML that can be
// processed by a fancy error report generator.
-
+
private final String commandName = this.getClass().getCanonicalName();
private final String[] args;
-
+
private PrintWriter reportWriter;
private int testCount;
private int failureCount;
@@ -78,7 +78,7 @@
if (args.length == 0) {
usage();
return;
- }
+ }
for (int i = 0; i < args.length && args[i].startsWith("-"); i++) {
String optName = args[i];
if (optName.equals("-r") || optName.equals("--resource") || optName.equals("--resources")) {
@@ -93,9 +93,9 @@
}
root = new File(args[i]);
} else {
- System.err.println("Unrecognized option '" + optName + "'");
- usage();
- return;
+ System.err.println("Unrecognized option '" + optName + "'");
+ usage();
+ return;
}
firstArg = i + 1;
}
@@ -123,8 +123,7 @@
execute(specs);
} catch (Exception ex) {
diagnose(ex, arg);
- }
- finally {
+ } finally {
if (is != null) {
try {
is.close();
@@ -134,10 +133,10 @@
}
}
}
- report("Ran " + testCount + " tests with " + failureCount +
- " test failures and " + exceptionCount + " errors (exceptions)");
+ report("Ran " + testCount + " tests with " + failureCount +
+ " test failures and " + exceptionCount + " errors (exceptions)");
}
-
+
private void usage() {
System.err.println(commandName + " [ <opt> ...] <spec-file> ... ");
System.err.println("where <opt> is one of: ");
@@ -145,7 +144,7 @@
System.err.println(" --sandbox | -s <dir-name> specifies the dev't sandbox root directory");
System.err.println(" --resource | -r looks for <spec-file> as a resource on the CLASSPATH");
}
-
+
private void execute(TestSetSpecification specs) {
for (TestSpecification spec : specs.getSpecs()) {
execute(spec);
@@ -226,7 +225,7 @@
reportWriter.println(message);
reportWriter.flush();
}
-
+
public void reportVerbose(String message) {
if (verbose) {
report(message);
Modified: trunk/shell/src/test/org/jnode/test/shell/harness/TextContent.java
===================================================================
--- trunk/shell/src/test/org/jnode/test/shell/harness/TextContent.java 2009-01-31 09:43:18 UTC (rev 4931)
+++ trunk/shell/src/test/org/jnode/test/shell/harness/TextContent.java 2009-01-31 09:52:51 UTC (rev 4932)
@@ -4,7 +4,7 @@
private final String rawText;
private final boolean trim;
private final String processedText;
-
+
public TextContent(String rawText, boolean trim) {
super();
this.rawText = rawText;
@@ -19,7 +19,7 @@
public boolean isTrim() {
return trim;
}
-
+
@Override
public String toString() {
return processedText;
@@ -38,8 +38,8 @@
* <li>Count the number of leading spaces on the (now) first line.
* <li>Remove this number of leading spaces from all lines.
* <li>Make sure that the last line has a final newline.
- * </ol>
- *
+ * </ol>
+ *
* @param text
* @return
*/
@@ -62,7 +62,7 @@
int count;
int len = tmp.length();
for (count = 0; count < len && tmp.charAt(count) == ' '; count++) {
- /**/
+ /**/
}
if (count > 0) {
StringBuilder sb = new StringBuilder(len);
@@ -70,18 +70,18 @@
for (int i = 0; i < len; i++) {
char ch = tmp.charAt(i);
switch (ch) {
- case ' ':
- if (pos++ >= count) {
- sb.append(' ');
- }
- break;
- case '\n':
- sb.append('\n');
- pos = 0;
- break;
- default:
- pos = count + 1;
- sb.append(ch);
+ case ' ':
+ if (pos++ >= count) {
+ sb.append(' ');
+ }
+ break;
+ case '\n':
+ sb.append('\n');
+ pos = 0;
+ break;
+ default:
+ pos = count + 1;
+ sb.append(ch);
}
}
tmp = sb.toString();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|