From 49b3d998a8d92291f69273256b0a5731e0ab7407 Mon Sep 17 00:00:00 2001 From: Josh Micich Date: Thu, 30 Oct 2008 18:33:35 +0000 Subject: [PATCH] Optimised slow test case (after reviewing original purpose) git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@709221 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/usermodel/TestWorkbook.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java b/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java index a585b8b68..e3135c74b 100644 --- a/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java +++ b/src/testcases/org/apache/poi/hssf/usermodel/TestWorkbook.java @@ -493,14 +493,16 @@ public final class TestWorkbook extends TestCase { } - public void testManyRows() { + /** + * Test for row indexes beyond {@link Short#MAX_VALUE}. + * This bug was first fixed in svn r352609. + */ + public void testRowIndexesBeyond32768() { HSSFWorkbook workbook = new HSSFWorkbook(); HSSFSheet sheet = workbook.createSheet(); HSSFRow row; HSSFCell cell; - int i, j; - for ( i = 0, j = 32771; j > 0; i++, j-- ) - { + for (int i = 32700; i < 32771; i++) { row = sheet.createRow(i); cell = row.createCell(0); cell.setCellValue(i);