klute 2003/11/24 14:31:01
Modified: src/testcases/org/apache/poi/hpsf/basic TestClassID.java
Log:
Reformatted
Revision Changes Path
1.3 +40 -30
jakarta-poi/src/testcases/org/apache/poi/hpsf/basic/TestClassID.java
Index: TestClassID.java
===================================================================
RCS file:
/home/cvs/jakarta-poi/src/testcases/org/apache/poi/hpsf/basic/TestClassID.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestClassID.java 31 Oct 2003 16:39:05 -0000 1.2
+++ TestClassID.java 24 Nov 2003 22:31:01 -0000 1.3
@@ -82,24 +82,24 @@
public void testEquals()
{
ClassID clsidTest1 = new ClassID(
- new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
- , 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 }
+ new byte[] {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10}
, 0
);
ClassID clsidTest2 = new ClassID(
- new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
- , 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 }
+ new byte[] {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10}
, 0
);
ClassID clsidTest3 = new ClassID(
- new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
- , 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x11 }
+ new byte[] {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x11 }
, 0
);
- Assert.assertEquals( clsidTest1, clsidTest1);
- Assert.assertEquals( clsidTest1, clsidTest2);
- Assert.assertFalse( clsidTest1.equals( clsidTest3));
- Assert.assertFalse( clsidTest1.equals( null));
+ Assert.assertEquals(clsidTest1, clsidTest1);
+ Assert.assertEquals(clsidTest1, clsidTest2);
+ Assert.assertFalse(clsidTest1.equals(clsidTest3));
+ Assert.assertFalse(clsidTest1.equals(null));
}
/**
* Try to write to a buffer that is too small. This should
@@ -108,35 +108,44 @@
public void testWriteArrayStoreException()
{
ClassID clsidTest = new ClassID(
- new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
- , 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 }
+ new byte[] {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10}
, 0
);
boolean bExceptionOccurred = false;
- try {
- clsidTest.write( new byte[ 15], 0);
- } catch( Exception e) {
+ try
+ {
+ clsidTest.write(new byte[15], 0);
+ }
+ catch (Exception e)
+ {
bExceptionOccurred = true;
}
- Assert.assertTrue( bExceptionOccurred);
+ Assert.assertTrue(bExceptionOccurred);
bExceptionOccurred = false;
- try {
- clsidTest.write( new byte[ 16], 1);
- } catch( Exception e) {
+ try
+ {
+ clsidTest.write(new byte[16], 1);
+ }
+ catch (Exception e)
+ {
bExceptionOccurred = true;
}
- Assert.assertTrue( bExceptionOccurred);
+ Assert.assertTrue(bExceptionOccurred);
// These should work without throwing an Exception
bExceptionOccurred = false;
- try {
- clsidTest.write( new byte[ 16], 0);
- clsidTest.write( new byte[ 17], 1);
- } catch( Exception e) {
+ try
+ {
+ clsidTest.write(new byte[16], 0);
+ clsidTest.write(new byte[17], 1);
+ }
+ catch (Exception e)
+ {
bExceptionOccurred = true;
}
- Assert.assertFalse( bExceptionOccurred);
+ Assert.assertFalse(bExceptionOccurred);
}
/**
* <p>Tests the [EMAIL PROTECTED] PropertySet} methods. The test file has two
@@ -146,13 +155,12 @@
public void testClassID()
{
ClassID clsidTest = new ClassID(
- new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
- , 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 }
+ new byte[] {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10}
, 0
);
- Assert.assertEquals(
- clsidTest.toString().toUpperCase()
- , "{04030201-0605-0807-090A-0B0C0D0E0F10}"
+ Assert.assertEquals(clsidTest.toString().toUpperCase(),
+ "{04030201-0605-0807-090A-0B0C0D0E0F10}"
);
}
@@ -160,6 +168,8 @@
/**
* <p>Runs the test cases stand-alone.</p>
+ *
+ * @param args Command-line parameters (ignored)
*/
public static void main(final String[] args)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]