poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avik.sengu...@itellix.com
Subject Next ... (was Re: cvs commit: jakarta-poi/src/testcases/org/apache/poi/hpsf/basic TestWrite.java)
Date Sun, 04 Jan 2004 08:11:20 GMT
HEAD is getting better, all hpsf testcases now work. Next one to attack is
TestValueRecordAggregates.testSharedFormula()

Andy, I think Aggregates are significantly changed by your performance code. Any
possibility of a quick primer on how records are created and stored in the new
scheme of things??

Quoting avik@apache.org:

> avik        2004/01/25 08:05:02
> 
>   Modified:    src/testcases/org/apache/poi/hpsf/basic TestWrite.java
>   Log:
>   I know POI developers are supposed to like working with binary data,
>   but going thru source code with a hex editor to figure out characters
>   isnt my idea of fun :))
>   Anyways, hpsf.basic.TestWrite now runs, on both UTF-8 and US-ASCII
>   environments.
>   
>   Revision  Changes    Path
>   1.12      +44 -31   
> jakarta-poi/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java
>   
>   Index: TestWrite.java
>   ===================================================================
>   RCS file:
> /home/cvs/jakarta-poi/src/testcases/org/apache/poi/hpsf/basic/TestWrite.java,v
>   retrieving revision 1.11
>   retrieving revision 1.12
>   diff -u -r1.11 -r1.12
>   --- TestWrite.java	3 Dec 2003 21:06:57 -0000	1.11
>   +++ TestWrite.java	25 Jan 2004 16:05:02 -0000	1.12
>   @@ -66,6 +66,7 @@
>    import java.io.PrintWriter;
>    import java.io.StringWriter;
>    import java.io.UnsupportedEncodingException;
>   +import java.util.Arrays;
>    import java.util.Date;
>    import java.util.HashMap;
>    import java.util.Map;
>   @@ -420,21 +421,21 @@
>                check(Variant.VT_I4, new Long(28), codepage);
>                check(Variant.VT_FILETIME, new Date(), codepage);
>                check(Variant.VT_LPSTR, "", codepage);
>   -            check(Variant.VT_LPSTR, "ä", codepage);
>   -            check(Variant.VT_LPSTR, "äö", codepage);
>   -            check(Variant.VT_LPSTR, "äöü", codepage);
>   -            check(Variant.VT_LPSTR, "äöüÄ", codepage);
>   -            check(Variant.VT_LPSTR, "äöüÄÖ", codepage);
>   -            check(Variant.VT_LPSTR, "äöüÄÖÜ", codepage);
>   -            check(Variant.VT_LPSTR, "äöüÄÖÜß", codepage);
>   +            check(Variant.VT_LPSTR, "\u00e4", codepage);
>   +            check(Variant.VT_LPSTR, "\u00e4\u00f6", codepage);
>   +            check(Variant.VT_LPSTR, "\u00e4\u00f6\u00fc", codepage);
>   +            check(Variant.VT_LPSTR, "\u00e4\u00f6\u00fc\u00c4",
> codepage);
>   +            check(Variant.VT_LPSTR, "\u00e4\u00f6\u00fc\u00c4\u00d6",
> codepage);
>   +            check(Variant.VT_LPSTR,
> "\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc", codepage);
>   +            check(Variant.VT_LPSTR,
> "\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df", codepage);
>                check(Variant.VT_LPWSTR, "", codepage);
>   -            check(Variant.VT_LPWSTR, "ä", codepage);
>   -            check(Variant.VT_LPWSTR, "äö", codepage);
>   -            check(Variant.VT_LPWSTR, "äöü", codepage);
>   -            check(Variant.VT_LPWSTR, "äöüÄ", codepage);
>   -            check(Variant.VT_LPWSTR, "äöüÄÖ", codepage);
>   -            check(Variant.VT_LPWSTR, "äöüÄÖÜ", codepage);
>   -            check(Variant.VT_LPWSTR, "äöüÄÖÜß", codepage);
>   +            check(Variant.VT_LPWSTR, "\u00e4", codepage);
>   +            check(Variant.VT_LPWSTR, "\u00e4\u00f6", codepage);
>   +            check(Variant.VT_LPWSTR, "\u00e4\u00f6\u00fc", codepage);
>   +            check(Variant.VT_LPWSTR, "\u00e4\u00f6\u00fc\u00c4",
> codepage);
>   +            check(Variant.VT_LPWSTR, "\u00e4\u00f6\u00fc\u00c4\u00d6",
> codepage);
>   +            check(Variant.VT_LPWSTR,
> "\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc", codepage);
>   +            check(Variant.VT_LPWSTR,
> "\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df", codepage);
>            }
>            catch (Exception ex)
>            {
>   @@ -465,13 +466,13 @@
>                try
>                {
>                    check(Variant.VT_LPSTR, "", codepage);
>   -                check(Variant.VT_LPSTR, "ä", codepage);
>   -                check(Variant.VT_LPSTR, "äö", codepage);
>   -                check(Variant.VT_LPSTR, "äöü", codepage);
>   -                check(Variant.VT_LPSTR, "äöüÄ", codepage);
>   -                check(Variant.VT_LPSTR, "äöüÄÖ", codepage);
>   -                check(Variant.VT_LPSTR, "äöüÄÖÜ", codepage);
>   -                check(Variant.VT_LPSTR, "äöüÄÖÜß", codepage);
>   +                check(Variant.VT_LPSTR, "\u00e4", codepage);
>   +                check(Variant.VT_LPSTR, "\u00e4\u00f6", codepage);
>   +                check(Variant.VT_LPSTR, "\u00e4\u00f6\u00fc", codepage);
>   +                check(Variant.VT_LPSTR, "\u00e4\u00f6\u00fc\u00c4",
> codepage);
>   +                check(Variant.VT_LPSTR, "\u00e4\u00f6\u00fc\u00c4\u00d6",
> codepage);
>   +                check(Variant.VT_LPSTR,
> "\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc", codepage);
>   +                check(Variant.VT_LPSTR,
> "\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df", codepage);
>                    if (codepage == 1200 || codepage == 65001)
>                        check(Variant.VT_LPSTR, "\u79D1\u5B78", codepage);
>                }
>   @@ -495,13 +496,13 @@
>                try
>                {
>                    check(Variant.VT_LPSTR, "", codepage);
>   -                check(Variant.VT_LPSTR, "ä", codepage);
>   -                check(Variant.VT_LPSTR, "äö", codepage);
>   -                check(Variant.VT_LPSTR, "äöü", codepage);
>   -                check(Variant.VT_LPSTR, "äöüÄ", codepage);
>   -                check(Variant.VT_LPSTR, "äöüÄÖ", codepage);
>   -                check(Variant.VT_LPSTR, "äöüÄÖÜ", codepage);
>   -                check(Variant.VT_LPSTR, "äöüÄÖÜß", codepage);
>   +                check(Variant.VT_LPSTR, "\u00e4", codepage);
>   +                check(Variant.VT_LPSTR, "\u00e4\u00f6", codepage);
>   +                check(Variant.VT_LPSTR, "\u00e4\u00f6\u00fc", codepage);
>   +                check(Variant.VT_LPSTR, "\u00e4\u00f6\u00fc\u00c4",
> codepage);
>   +                check(Variant.VT_LPSTR, "\u00e4\u00f6\u00fc\u00c4\u00d6",
> codepage);
>   +                check(Variant.VT_LPSTR,
> "\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc", codepage);
>   +                check(Variant.VT_LPSTR,
> "\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df", codepage);
>                    fail("UnsupportedEncodingException for codepage " +
> codepage +
>                         " expected.");
>                }
>   @@ -602,11 +603,23 @@
>        {
>            final File dataDir =
>                new File(System.getProperty("HPSF.testdata.path"));
>   +        String[] filesToTest = new String[]{
>   +			"Test0313rur.adm",
>   +			"TestChineseProperties.doc",
>   +			"TestCorel.shw",
>   +			"TestEditTime.doc",
>   +			"TestGermanWord90.doc",
>   +			"TestMickey.doc",
>   +			"TestSectionDictionary.doc",
>   +			"TestUnicode.xls"
>   +
>   +        };
>   +        final java.util.List listFilesToTest =
> Arrays.asList(filesToTest);
>            final File[] fileList = dataDir.listFiles(new FileFilter()
>                {
>                    public boolean accept(final File f)
>                    {
>   -                    return f.isFile();
>   +                    return listFilesToTest.contains(f.getName());
>                    }
>                });
>            for (int i = 0; i < fileList.length; i++)
>   @@ -666,7 +679,7 @@
>                
>                    /* Compare the property set stream with the corresponding
> one
>                     * from the origin file and check whether they are equal.
> */
>   -                assertEquals(ps1, ps2);
>   +                assertEquals("Equality for file "+f.getName(),ps1, ps2);
>                }
>            }
>            catch (Exception ex)
>   
>   
>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-dev-help@jakarta.apache.org
> 
> 





---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message