Emmanuel Lecharny wrote:
> IMO, it would be better to use \u notation in your String to avoid such
> problems. I'm using UTF-8 encoding as a default on my IDE, and if one
> developer is using something different (ie, ISO8859-1, for instance),
> that will be a big problem.
>
> In this case, the code should be :
>
> assertFailureOpeningElementName("<&()\u00c2§$%/>");
+1
Thanks for the suggestion.
In fact, thinking a little bit more about this, I lean towards looking
into the history of this line to see what was intented to be tested
here, exactly.
Bernd
>
>
>
>
> [email protected] wrote:
>> Author: berndf
>> Date: Thu May 14 15:22:39 2009
>> New Revision: 774819
>>
>> URL: http://svn.apache.org/viewvc?rev=774819&view=rev
>> Log:
>> [vysper] restore garbled chars from r774707
>>
>> Modified:
>>
>> mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/xmldecoder/XMLParticleTestCase.java
>>
>>
>> Modified:
>> mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/xmldecoder/XMLParticleTestCase.java
>>
>> URL:
>> http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/xmldecoder/XMLParticleTestCase.java?rev=774819&r1=774818&r2=774819&view=diff
>>
>> ==============================================================================
>>
>> ---
>> mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/xmldecoder/XMLParticleTestCase.java
>> (original)
>> +++
>> mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/xmldecoder/XMLParticleTestCase.java
>> Thu May 14 15:22:39 2009
>> @@ -39,7 +39,7 @@
>> public void testWrongOpeningElementName() {
>> assertFailureOpeningElementName("<>");
>> - assertFailureOpeningElementName("<&()�$%/>");
>> + assertFailureOpeningElementName("<&()§$%/>");
>> assertFailureOpeningElementName("< space-prefixed />");
>> assertFailureOpeningElementName("<-prefixed>");
>> }
>>
>>
>>
>
>