diff options
author | Josh Micich <josh@apache.org> | 2008-04-07 03:02:03 +0000 |
---|---|---|
committer | Josh Micich <josh@apache.org> | 2008-04-07 03:02:03 +0000 |
commit | bf756d96784b527c3cb77d455d9f0c322311d091 (patch) | |
tree | 08b9b03e4820164076827a8cbd0de2aca09275bf /src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java | |
parent | b938b6c97f47f085757b330d1bce90293c863afb (diff) | |
download | poi-bf756d96784b527c3cb77d455d9f0c322311d091.tar.gz poi-bf756d96784b527c3cb77d455d9f0c322311d091.zip |
refactored all hssf junits to get test sample data in the in one place
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@645348 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java')
-rw-r--r-- | src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java b/src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java index 3f876c8663..cd7ae1c7b4 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestUnfixedBugs.java @@ -14,43 +14,36 @@ See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ -package org.apache.poi.hssf.usermodel; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; +package org.apache.poi.hssf.usermodel; +import junit.framework.AssertionFailedError; import junit.framework.TestCase; +import org.apache.poi.hssf.HSSFTestDataSamples; +import org.apache.poi.hssf.record.RecordFormatException; + /** * @author aviks - * - * This testcase contains tests for bugs that are yet to be fixed. - * Therefore, the standard ant test target does not run these tests. - * Run this testcase with the single-test target. - * The names of the tests usually correspond to the Bugzilla id's - * PLEASE MOVE tests from this class to TestBugs once the bugs are fixed, - * so that they are then run automatically. + * + * This testcase contains tests for bugs that are yet to be fixed. Therefore, + * the standard ant test target does not run these tests. Run this testcase with + * the single-test target. The names of the tests usually correspond to the + * Bugzilla id's PLEASE MOVE tests from this class to TestBugs once the bugs are + * fixed, so that they are then run automatically. */ -public class TestUnfixedBugs extends TestCase { - - - public TestUnfixedBugs(String arg0) { - super(arg0); - +public final class TestUnfixedBugs extends TestCase { + + public void test43493() { + // Has crazy corrupt sub-records on + // a EmbeddedObjectRefSubRecord + try { + HSSFTestDataSamples.openSampleWorkbook("43493.xls"); + } catch (RecordFormatException e) { + if (e.getCause().getCause() instanceof ArrayIndexOutOfBoundsException) { + throw new AssertionFailedError("Identified bug 43493"); + } + throw e; + } } - - protected String cwd = System.getProperty("HSSF.testdata.path"); - - - - public void test43493() throws Exception { - // Has crazy corrup subrecords on - // a EmbeddedObjectRefSubRecord - File f = new File(cwd, "43493.xls"); - HSSFWorkbook wb = new HSSFWorkbook( - new FileInputStream(f) - ); - } } |