You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by av...@itellix.com on 2003/12/29 13:24:48 UTC

HPSF Testcase on HEAD

Rainer,

testVariantTypes in org.apache.poi.hpsf.basic.TestWrite fails with a message 
    [junit] junit.framework.AssertionFailedError: expected:<&#65533;> but was:<?>
    [junit]     at junit.framework.Assert.fail(Assert.java:47)
    [junit]     at junit.framework.Assert.failNotEquals(Assert.java:282)
    [junit]     at junit.framework.Assert.assertEquals(Assert.java:64)
    [junit]     at junit.framework.Assert.assertEquals(Assert.java:71)
    [junit]     at org.apache.poi.hpsf.basic.TestWrite.check(TestWrite.java:555)
    [junit]     at
org.apache.poi.hpsf.basic.TestWrite.testCodepages(TestWrite.java:468)

can you figure out whats wrong? I've tried in linux under both UTF-8 and
ISO-8859-1 environments. 

This is on cvs HEAD.

This is also where gump is failing right now.
http://gump.covalent.net/log/jakarta-poi-3.html

Regards
-
Avik



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


Re: HPSF Testcase on HEAD

Posted by av...@itellix.com.
On more investigation, i think the culprits are lines of the type
check(Variant.VT_LPSTR, "&#65533;", codepage);

(Note: I can see a question mark within the quote marks above as i type this
mail in mozilla, but there is not saying what YOU will see when you read this
mail!.. for example, in my previous mail below, i could see four question marks
when i composed it, but now that I am replying, one of them has turned
automagically into &#65533; !!!!! On my terminal, some are ? and some are little
squares, depending on my LANG setting :(   )

The only was to ensure this is even remotely sane on multiple environment is to
use the \uxxxx notation for high-byte string literals. 

One option maybe to ensure the files are saved as UTF-8, and check them in as
binary file into CVS, but even that, i think is fraught with JVM version and
LANG settings at compile time. 

Quoting avik.sengupta@itellix.com:

> Actually, scratch the previous stacktrace...
> 
> On UTF-8, the result is:
>     [junit] Testcase: testNoFormatID took 0.066 sec
>     [junit] Testcase: testWriteEmptyPropertySet took 0.078 sec
>     [junit] Testcase: testWriteSimplePropertySet took 0.007 sec
>     [junit] Testcase: testWriteTwoSections took 0.004 sec
>     [junit] Testcase: testVariantTypes took 0.004 sec
>     [junit] Testcase: testCodepages took 0.008 sec
>     [junit]     FAILED
>     [junit] junit.framework.AssertionFailedError: expected:<&#65533;> but
> was:<?>
>     [junit]     at junit.framework.Assert.fail(Assert.java:47)
>     [junit]     at junit.framework.Assert.failNotEquals(Assert.java:282)
>     [junit]     at junit.framework.Assert.assertEquals(Assert.java:64)
>     [junit]     at junit.framework.Assert.assertEquals(Assert.java:71)
>     [junit]     at
> org.apache.poi.hpsf.basic.TestWrite.check(TestWrite.java:555)
>     [junit]     at
> org.apache.poi.hpsf.basic.TestWrite.testCodepages(TestWrite.java:468)
> 
> on en_US-ISO8859-1 (or US-ASCII) the result is:
>     [junit] Testcase: testNoFormatID took 0.07 sec
>     [junit] Testcase: testWriteEmptyPropertySet took 0.069 sec
>     [junit] Testcase: testWriteSimplePropertySet took 0.007 sec
>     [junit] Testcase: testWriteTwoSections took 0.007 sec
>     [junit] Testcase: testVariantTypes took 0.005 sec
>     [junit]     FAILED
>     [junit] junit.framework.AssertionFailedError: expected:<?> but was:<?>
>     [junit]     at junit.framework.Assert.fail(Assert.java:47)
>     [junit]     at junit.framework.Assert.failNotEquals(Assert.java:282)
>     [junit]     at junit.framework.Assert.assertEquals(Assert.java:64)
>     [junit]     at junit.framework.Assert.assertEquals(Assert.java:71)
>     [junit]     at
> org.apache.poi.hpsf.basic.TestWrite.check(TestWrite.java:555)
>     [junit]     at
> org.apache.poi.hpsf.basic.TestWrite.testVariantTypes(TestWrite.java:423)
> 
> 
> So different errors on different default charset setting. 
> 
> 
> Quoting avik.sengupta@itellix.com:
> 
> > Rainer,
> > 
> > testVariantTypes in org.apache.poi.hpsf.basic.TestWrite fails with a
> message
> > 
> >     [junit] junit.framework.AssertionFailedError: expected:<&#65533;> but
> > was:<?>
> >     [junit]     at junit.framework.Assert.fail(Assert.java:47)
> >     [junit]     at junit.framework.Assert.failNotEquals(Assert.java:282)
> >     [junit]     at junit.framework.Assert.assertEquals(Assert.java:64)
> >     [junit]     at junit.framework.Assert.assertEquals(Assert.java:71)
> >     [junit]     at
> > org.apache.poi.hpsf.basic.TestWrite.check(TestWrite.java:555)
> >     [junit]     at
> > org.apache.poi.hpsf.basic.TestWrite.testCodepages(TestWrite.java:468)
> > 
> > can you figure out whats wrong? I've tried in linux under both UTF-8 and
> > ISO-8859-1 environments. 
> > 
> > This is on cvs HEAD.
> > 
> > This is also where gump is failing right now.
> > http://gump.covalent.net/log/jakarta-poi-3.html
> > 
> > Regards
> > -
> > Avik
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > 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
> 
> 





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


Re: HPSF Testcase on HEAD

Posted by av...@itellix.com.
Actually, scratch the previous stacktrace...

On UTF-8, the result is:
    [junit] Testcase: testNoFormatID took 0.066 sec
    [junit] Testcase: testWriteEmptyPropertySet took 0.078 sec
    [junit] Testcase: testWriteSimplePropertySet took 0.007 sec
    [junit] Testcase: testWriteTwoSections took 0.004 sec
    [junit] Testcase: testVariantTypes took 0.004 sec
    [junit] Testcase: testCodepages took 0.008 sec
    [junit]     FAILED
    [junit] junit.framework.AssertionFailedError: expected:<&#65533;> but was:<?>
    [junit]     at junit.framework.Assert.fail(Assert.java:47)
    [junit]     at junit.framework.Assert.failNotEquals(Assert.java:282)
    [junit]     at junit.framework.Assert.assertEquals(Assert.java:64)
    [junit]     at junit.framework.Assert.assertEquals(Assert.java:71)
    [junit]     at org.apache.poi.hpsf.basic.TestWrite.check(TestWrite.java:555)
    [junit]     at
org.apache.poi.hpsf.basic.TestWrite.testCodepages(TestWrite.java:468)

on en_US-ISO8859-1 (or US-ASCII) the result is:
    [junit] Testcase: testNoFormatID took 0.07 sec
    [junit] Testcase: testWriteEmptyPropertySet took 0.069 sec
    [junit] Testcase: testWriteSimplePropertySet took 0.007 sec
    [junit] Testcase: testWriteTwoSections took 0.007 sec
    [junit] Testcase: testVariantTypes took 0.005 sec
    [junit]     FAILED
    [junit] junit.framework.AssertionFailedError: expected:<?> but was:<?>
    [junit]     at junit.framework.Assert.fail(Assert.java:47)
    [junit]     at junit.framework.Assert.failNotEquals(Assert.java:282)
    [junit]     at junit.framework.Assert.assertEquals(Assert.java:64)
    [junit]     at junit.framework.Assert.assertEquals(Assert.java:71)
    [junit]     at org.apache.poi.hpsf.basic.TestWrite.check(TestWrite.java:555)
    [junit]     at
org.apache.poi.hpsf.basic.TestWrite.testVariantTypes(TestWrite.java:423)


So different errors on different default charset setting. 


Quoting avik.sengupta@itellix.com:

> Rainer,
> 
> testVariantTypes in org.apache.poi.hpsf.basic.TestWrite fails with a message
> 
>     [junit] junit.framework.AssertionFailedError: expected:<&#65533;> but
> was:<?>
>     [junit]     at junit.framework.Assert.fail(Assert.java:47)
>     [junit]     at junit.framework.Assert.failNotEquals(Assert.java:282)
>     [junit]     at junit.framework.Assert.assertEquals(Assert.java:64)
>     [junit]     at junit.framework.Assert.assertEquals(Assert.java:71)
>     [junit]     at
> org.apache.poi.hpsf.basic.TestWrite.check(TestWrite.java:555)
>     [junit]     at
> org.apache.poi.hpsf.basic.TestWrite.testCodepages(TestWrite.java:468)
> 
> can you figure out whats wrong? I've tried in linux under both UTF-8 and
> ISO-8859-1 environments. 
> 
> This is on cvs HEAD.
> 
> This is also where gump is failing right now.
> http://gump.covalent.net/log/jakarta-poi-3.html
> 
> Regards
> -
> Avik
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Re: HPSF Testcase on HEAD

Posted by Avik Sengupta <av...@itellix.com>.
> No insults, please! :-) I am not working under Windows but instead I use a real operating system: Linux.
> 
Sorry :) ..  

but can you send me the copy of the file you have zipped up? I want to
compare.. I am not certain that its not been messed by CVS. Also, what's
your LANG setting?

Regards
-
Avik


> The test case giving you problems is not yet as sophisticated as it should be. Depending on the locale it works or not. This must be changed. I think HPSF should check whether a encoding succeeded and should throw an appropriate exceptions if the character in question cannot be mapped to a byte using a certain encoding.
> 
> BTW, if you (or I or whoever) solve that you'll encounter the next test case that fails. This is also nothing dramatically wrong but just a nit to pick. This stuff is really not yet completed (the test cases, not the implementatiion, I suppose).
> 
> Best regards
> Rainer Klute
> 
>                            Rainer Klute IT-Consulting GmbH
>   Dipl.-Inform.
>   Rainer Klute             E-Mail:  klute@rainer-klute.de
>   Körner Grund 24          Telefon: +49 172 2324824
> D-44143 Dortmund           Telefax: +49 231 5349423


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


Re: HPSF Testcase on HEAD

Posted by Rainer Klute <kl...@rainer-klute.de>.
On Tue, 20 Jan 2004 03:48:59 +051800 avik.sengupta@itellix.com wrote:
> Can you send me your version of the file (it passes the testcase on your windows
> m/c, i suppose?) zipped up? Better still, if you can tell me the unicode values
> of the characters you are checking against, i can replace them in the test. 

No insults, please! :-) I am not working under Windows but instead I use a real operating system: Linux.

The test case giving you problems is not yet as sophisticated as it should be. Depending on the locale it works or not. This must be changed. I think HPSF should check whether a encoding succeeded and should throw an appropriate exceptions if the character in question cannot be mapped to a byte using a certain encoding.

BTW, if you (or I or whoever) solve that you'll encounter the next test case that fails. This is also nothing dramatically wrong but just a nit to pick. This stuff is really not yet completed (the test cases, not the implementatiion, I suppose).

Best regards
Rainer Klute

                           Rainer Klute IT-Consulting GmbH
  Dipl.-Inform.
  Rainer Klute             E-Mail:  klute@rainer-klute.de
  Körner Grund 24          Telefon: +49 172 2324824
D-44143 Dortmund           Telefax: +49 231 5349423

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


Re: HPSF Testcase on HEAD

Posted by av...@itellix.com.
Can you send me your version of the file (it passes the testcase on your windows
m/c, i suppose?) zipped up? Better still, if you can tell me the unicode values
of the characters you are checking against, i can replace them in the test. 

Quoting Rainer Klute <kl...@rainer-klute.de>:

> On Tue, 20 Jan 2004 02:24:48 +051800 avik.sengupta@itellix.com wrote:
> > can you figure out whats wrong? I've tried in linux under both UTF-8 and
> > ISO-8859-1 environments. 
> > 
> > This is on cvs HEAD.
> 
> Yes, I know. Since I am quite busy with other stuff I hope I can deal with it
> in April. If someone of you has time to look at it you are welcome to do so.
> 
> Should I deactivate the test case to let Gump run smoothly? I am reluctant to
> do so because it would render the test case useless, at least for the time
> being.
> 
> Best regard
> Rainer Klute
> 
>                            Rainer Klute IT-Consulting GmbH
>   Dipl.-Inform.
>   Rainer Klute             E-Mail:  klute@rainer-klute.de
>   Körner Grund 24          Telefon: +49 172 2324824
> D-44143 Dortmund           Telefax: +49 231 5349423
> 
> ---------------------------------------------------------------------
> 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


Re: HPSF Testcase on HEAD

Posted by Rainer Klute <kl...@rainer-klute.de>.
On Tue, 20 Jan 2004 02:24:48 +051800 avik.sengupta@itellix.com wrote:
> can you figure out whats wrong? I've tried in linux under both UTF-8 and
> ISO-8859-1 environments. 
> 
> This is on cvs HEAD.

Yes, I know. Since I am quite busy with other stuff I hope I can deal with it in April. If someone of you has time to look at it you are welcome to do so.

Should I deactivate the test case to let Gump run smoothly? I am reluctant to do so because it would render the test case useless, at least for the time being.

Best regard
Rainer Klute

                           Rainer Klute IT-Consulting GmbH
  Dipl.-Inform.
  Rainer Klute             E-Mail:  klute@rainer-klute.de
  Körner Grund 24          Telefon: +49 172 2324824
D-44143 Dortmund           Telefax: +49 231 5349423

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