You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2006/04/15 11:15:00 UTC

[jira] Created: (HARMONY-352) tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded

tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded
----------------------------------------------------------------

         Key: HARMONY-352
         URL: http://issues.apache.org/jira/browse/HARMONY-352
     Project: Harmony
        Type: Improvement

  Components: Classlib  
    Reporter: Mark Hindess
    Priority: Trivial


tests/api/java/util/regex/PatternSyntaxExceptionTest is currently excluded because it was testing for incorrect behaviour.  This should be fixed.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (HARMONY-352) tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded

Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-352?page=all ]

Mikhail Loenko reassigned HARMONY-352:
--------------------------------------

    Assign To: Mikhail Loenko

> tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded
> ----------------------------------------------------------------
>
>          Key: HARMONY-352
>          URL: http://issues.apache.org/jira/browse/HARMONY-352
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Mikhail Loenko
>     Priority: Trivial
>  Attachments: fix.patternsyntaxexceptiontest.diff
>
> tests/api/java/util/regex/PatternSyntaxExceptionTest is currently excluded because it was testing for incorrect behaviour.  This should be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-352) tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-352?page=comments#action_12374851 ] 

Mark Hindess commented on HARMONY-352:
--------------------------------------

Looks good. Thanks Mikhail.

> tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded
> ----------------------------------------------------------------
>
>          Key: HARMONY-352
>          URL: http://issues.apache.org/jira/browse/HARMONY-352
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Mikhail Loenko
>     Priority: Trivial
>  Attachments: fix.patternsyntaxexceptiontest.diff
>
> tests/api/java/util/regex/PatternSyntaxExceptionTest is currently excluded because it was testing for incorrect behaviour.  This should be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-352) tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-352?page=comments#action_12374889 ] 

Mark Hindess commented on HARMONY-352:
--------------------------------------

I agree.  This is a terrible fix.  Fixing the index to always be <= last index seems like a reasonable solution.


> tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded
> ----------------------------------------------------------------
>
>          Key: HARMONY-352
>          URL: http://issues.apache.org/jira/browse/HARMONY-352
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Mikhail Loenko
>     Priority: Trivial
>  Attachments: fix.patternsyntaxexceptiontest.diff
>
> tests/api/java/util/regex/PatternSyntaxExceptionTest is currently excluded because it was testing for incorrect behaviour.  This should be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-352) tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-352?page=all ]

Mark Hindess updated HARMONY-352:
---------------------------------

    Attachment: fix.patternsyntaxexceptiontest.diff

This is a fix for the behaviour the test is checking for.  The expected behaviour now matches the RI.

It also fixes the ordering of arguments to assertEquals to include the expected value first so we get less confusing error messages.

It changes the assertTrue statements to assertEquals. (to get better error messages).

Finally, it fixes the index in the exception thrown for one of the tests in order to match the RI behaviour.


> tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded
> ----------------------------------------------------------------
>
>          Key: HARMONY-352
>          URL: http://issues.apache.org/jira/browse/HARMONY-352
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Priority: Trivial
>  Attachments: fix.patternsyntaxexceptiontest.diff
>
> tests/api/java/util/regex/PatternSyntaxExceptionTest is currently excluded because it was testing for incorrect behaviour.  This should be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HARMONY-352) tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded

Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-352?page=all ]
     
Mikhail Loenko resolved HARMONY-352:
------------------------------------

    Resolution: Fixed

fixed in revision 394825
Mark, please verify that it fully resolves the problem

> tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded
> ----------------------------------------------------------------
>
>          Key: HARMONY-352
>          URL: http://issues.apache.org/jira/browse/HARMONY-352
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Mikhail Loenko
>     Priority: Trivial
>  Attachments: fix.patternsyntaxexceptiontest.diff
>
> tests/api/java/util/regex/PatternSyntaxExceptionTest is currently excluded because it was testing for incorrect behaviour.  This should be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (HARMONY-352) tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded

Posted by "Mikhail Loenko (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-352?page=all ]
     
Mikhail Loenko closed HARMONY-352:
----------------------------------


verified by Mark

> tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded
> ----------------------------------------------------------------
>
>          Key: HARMONY-352
>          URL: http://issues.apache.org/jira/browse/HARMONY-352
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Mikhail Loenko
>     Priority: Trivial
>  Attachments: fix.patternsyntaxexceptiontest.diff
>
> tests/api/java/util/regex/PatternSyntaxExceptionTest is currently excluded because it was testing for incorrect behaviour.  This should be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-352) tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded

Posted by "Nikolay Kuznetsov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-352?page=comments#action_12374887 ] 

Nikolay Kuznetsov commented on HARMONY-352:
-------------------------------------------

> Finally, it fixes the index in the exception thrown for one of the tests in order to match the RI behaviour.
+++ modules/regex/src/main/java/java/util/regex/Pattern.java	(working copy)
@@ -592,7 +592,7 @@
                     if (lexemes.peek() != Lexer.CHAR_RIGHT_PARENTHESIS)
                         throw new PatternSyntaxException(I18n
                                 .getMessage("unmatched ("), lexemes.toString(),
-                                lexemes.getIndex());
+                                lexemes.getIndex()-1);

I'm a bit concerned about this fix. This one result in incorrect output for all the case except one under test. The actual cause of incorrect index is that pattern moves index after last index of the pattern string is already read(fix for indices):

+++ modules/regex/src/main/java/java/util/regex/Pattern.java	(working copy)
@@ -733,6 +733,8 @@
                         term = new RangeSet(cc);
                     } else if (!lexemes.isEmpty()) {
                         term = new CharSet((char) ch);
+                    } else {
+                        break;
                     }

Since this fix interfere with HARMONY-350 fix, let me comment on it also, and I'll provide separate fix for this problem.


> tests/api/java/util/regex/PatternSyntaxExceptionTest is excluded
> ----------------------------------------------------------------
>
>          Key: HARMONY-352
>          URL: http://issues.apache.org/jira/browse/HARMONY-352
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Mikhail Loenko
>     Priority: Trivial
>  Attachments: fix.patternsyntaxexceptiontest.diff
>
> tests/api/java/util/regex/PatternSyntaxExceptionTest is currently excluded because it was testing for incorrect behaviour.  This should be fixed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira