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 22:19:00 UTC

[jira] Created: (HARMONY-353) improvements to junit test method usage

improvements to junit test method usage
---------------------------------------

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

  Components: Classlib  
    Reporter: Mark Hindess
    Priority: Trivial


While fixing the test in HARMONY-352, I found some confusing junit
error messages.  They were things like:

  error expected <actual> but got <expected>

rather than:

  error expected <expected> but got <actual>

Because the arguments to the assertEquals method were the wrong way
around.  The expected value should come first.  Anyway, I fixed these
for that one test.  We should try to fix these when we find them and
we should try to avoid adding any more.

This JIRA is because I decided that it was reasonable to fix any method like:

  assertEquals(..., <constant>);

since a constant couldn't very well be the value being tested.


-- 
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-353) improvements to junit test method usage

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


Thanks Mark - final patch was applied at repo. revision 397369 -- closing.

> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Stepan Mishura
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, assert.usage.combined.diff, combined.20060425.diff, final.attempt.to.catch.the.conflicts.diff, improved.assertequals.usage.diff, text.only.update.20060426.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mark Hindess commented on HARMONY-353:
--------------------------------------

I assume the luni failure was in:
  modules/luni/src/test/java/tests/api/java/lang/reflect/FieldTest.java

I had a fix for that but must have got missed in my combined patches.  Basically the test on around line 1030 needed to use the four argument float assertEquals:

  assertEquals("Returned incorrect float field value", 1.0, val, 0.0);

just testing the TEXT module patch...


> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Stepan Mishura
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, assert.usage.combined.diff, combined.20060425.diff, improved.assertequals.usage.diff, text.only.update.20060426.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mark Hindess updated HARMONY-353:
---------------------------------

    Attachment: text.only.update.20060426.diff

Patch for text module.


> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Stepan Mishura
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, assert.usage.combined.diff, combined.20060425.diff, improved.assertequals.usage.diff, text.only.update.20060426.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mikhail Loenko reassigned HARMONY-353:
--------------------------------------

    Assign To: Mikhail Loenko

> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Mikhail Loenko
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, improved.assertequals.usage.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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


Re: [jira] Assigned: (HARMONY-353) improvements to junit test method usage

Posted by Stepan Mishura <st...@gmail.com>.
Hi Mark,

Update 396968 renamed tests in 'text' module. Could you provide a new patch
for this module?

Thanks,
Stepan.

On 4/25/06, Stepan Mishura wrote:
>
>  It would be nice to have a new combined patch.
>
> Thanks,
> Stepan.
>
> On 4/25/06, Mark Hindess wrote:
>
> >
> > Stepan
> >
> > These patches have lots of clashes now.  I have new versions if you'd
> > like me to upload them - or I can upload a new combined patch?
> >
> > -Mark.
> >
> > On 25 April 2006 at 9:56, "Stepan Mishura (JIRA)" <ji...@apache.org>
> > wrote:
> > >      [ http://issues.apache.org/jira/browse/HARMONY-353?page=all ]
> > >
> > > Stepan Mishura reassigned HARMONY-353:
> > > --------------------------------------
> > >
> > >     Assign To: Stepan Mishura
> > >
> > > > improvements to junit test method usage
> > > > ---------------------------------------
> > > >
> > > >          Key: HARMONY-353
> > > >          URL: http://issues.apache.org/jira/browse/HARMONY-353
> > > >      Project: Harmony
> > > >         Type: Improvement
> > >
> > > >   Components: Classlib
> > > >     Reporter: Mark Hindess
> > > >     Assignee: Stepan Mishura
> > > >     Priority: Trivial
> > > >  Attachments: 01.assertnull.diff, 02.assertequals.string.diff,
> > 03.assertequ
> > > als.constants.diff, 04.assertequals.char.constants.diff,
> > 05.assertnotnull.dif
> > > f, assert.usage.combined.diff, improved.assertequals.usage.diff
> > > >
> > > > While fixing the test in HARMONY-352, I found some confusing junit
> > > > error messages.  They were things like:
> > > >   error expected <actual> but got <expected>
> > > > rather than:
> > > >   error expected <expected> but got <actual>
> > > > Because the arguments to the assertEquals method were the wrong way
> > > > around.  The expected value should come first.  Anyway, I fixed
> > these
> > > > for that one test.  We should try to fix these when we find them and
> > > > we should try to avoid adding any more.
> > > > This JIRA is because I decided that it was reasonable to fix any
> > method lik
> > > e:
> > > >   assertEquals(..., <constant>);
> > > > since a constant couldn't very well be the value being tested.
> > >
> > > --
> > > 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
> >
> >
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Thanks,
> Stepan Mishura
> Intel Middleware Products Division
>
>
> ------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>



--
Thanks,
Stepan Mishura
Intel Middleware Products Division

------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

Re: [jira] Assigned: (HARMONY-353) improvements to junit test method usage

Posted by Stepan Mishura <st...@gmail.com>.
It would be nice to have a new combined patch.

Thanks,
Stepan.

On 4/25/06, Mark Hindess wrote:
>
>
> Stepan
>
> These patches have lots of clashes now.  I have new versions if you'd
> like me to upload them - or I can upload a new combined patch?
>
> -Mark.
>
> On 25 April 2006 at 9:56, "Stepan Mishura (JIRA)" <ji...@apache.org> wrote:
> >      [ http://issues.apache.org/jira/browse/HARMONY-353?page=all ]
> >
> > Stepan Mishura reassigned HARMONY-353:
> > --------------------------------------
> >
> >     Assign To: Stepan Mishura
> >
> > > improvements to junit test method usage
> > > ---------------------------------------
> > >
> > >          Key: HARMONY-353
> > >          URL: http://issues.apache.org/jira/browse/HARMONY-353
> > >      Project: Harmony
> > >         Type: Improvement
> >
> > >   Components: Classlib
> > >     Reporter: Mark Hindess
> > >     Assignee: Stepan Mishura
> > >     Priority: Trivial
> > >  Attachments: 01.assertnull.diff, 02.assertequals.string.diff,
> 03.assertequ
> > als.constants.diff, 04.assertequals.char.constants.diff,
> 05.assertnotnull.dif
> > f, assert.usage.combined.diff, improved.assertequals.usage.diff
> > >
> > > While fixing the test in HARMONY-352, I found some confusing junit
> > > error messages.  They were things like:
> > >   error expected <actual> but got <expected>
> > > rather than:
> > >   error expected <expected> but got <actual>
> > > Because the arguments to the assertEquals method were the wrong way
> > > around.  The expected value should come first.  Anyway, I fixed these
> > > for that one test.  We should try to fix these when we find them and
> > > we should try to avoid adding any more.
> > > This JIRA is because I decided that it was reasonable to fix any
> method lik
> > e:
> > >   assertEquals(..., <constant>);
> > > since a constant couldn't very well be the value being tested.
> >
> > --
> > 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
>
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


--
Thanks,
Stepan Mishura
Intel Middleware Products Division

------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

[jira] Assigned: (HARMONY-353) improvements to junit test method usage

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

Stepan Mishura reassigned HARMONY-353:
--------------------------------------

    Assign To: Stepan Mishura

> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Stepan Mishura
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, assert.usage.combined.diff, improved.assertequals.usage.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mark Hindess updated HARMONY-353:
---------------------------------

    Attachment: 04.assertequals.char.constants.diff
                05.assertnotnull.diff

...

04 fixes assertTrue(... == 'c') to assertEquals
05 fixes assertTrue(... != null) to assertNotNull


> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, improved.assertequals.usage.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mark Hindess updated HARMONY-353:
---------------------------------

    Attachment: 01.assertnull.diff
                02.assertequals.string.diff
                03.assertequals.constants.diff

The "improved.assertequals.usage.diff" patch should be applied first then the numbered patches in order.

01 fixes assertTrue(... == null) to assertNull(...)
02 fixes assertTrue(... == .equals("constant")) to assertEquals
03.fixes.assertTrue(... == numeric_constant)) to assertEquals


> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, improved.assertequals.usage.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mark Hindess updated HARMONY-353:
---------------------------------

    Attachment: assert.usage.combined.diff

Odd.  Works for me with unix patch on a fresh checkout.  Oh well, here's a comibned patch.


> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Mikhail Loenko
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, assert.usage.combined.diff, improved.assertequals.usage.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-353?page=comments#action_12376432 ] 

Stepan Mishura commented on HARMONY-353:
----------------------------------------

Thanks Mark for such big tests improvement!

I've splitted update. I've applied your combined patch to following modules:
1) ARCHIVE - revision 396855
2) AUTH - revision 396860
3) CRYPTO -revision 396862
4) LUNI - revision 397123 (I excluded conflicts and one failed test)
5) MATH - revision 397135 (I excluded conflicts)
6) NIO_CHAR - revision 396872
7) REGEX - revision 397139
8) SECURITY - revision 397071
9) SQL - revision 396869

Waiting for patch for TEXT module.

> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Stepan Mishura
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, assert.usage.combined.diff, combined.20060425.diff, improved.assertequals.usage.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mikhail Loenko reassigned HARMONY-353:
--------------------------------------

    Assign To:     (was: Mikhail Loenko)

cann't  apply the patch as it reports dozes of errors 
maybe someone else will be more lucky


> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, assert.usage.combined.diff, improved.assertequals.usage.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

    Resolution: Fixed

Thanks Mark, patch TEXT module was applied at repo revision 397158 and FieldTest.java fixed at repo revision 397162.

Please check that the whole patch was applied as you expected.

> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Stepan Mishura
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, assert.usage.combined.diff, combined.20060425.diff, improved.assertequals.usage.diff, text.only.update.20060426.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mikhail Loenko commented on HARMONY-353:
----------------------------------------

Mark,

SVN reports a lot of errors when I'm applying patches in the described order.
Could you please submit a single patch with all the changes?

Thanks,
Mikhail

> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Mikhail Loenko
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, improved.assertequals.usage.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mark Hindess updated HARMONY-353:
---------------------------------

    Attachment: improved.assertequals.usage.diff

As well as fixing as many of the obviously incorrect assertEquals calls, I also changed a number of assertTrue(..., false) and assertFalse(..., true) calls to fail calls.  And fixed a few assertEquals calls that were testing for null to assertNull.


> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Priority: Trivial
>  Attachments: improved.assertequals.usage.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mark Hindess updated HARMONY-353:
---------------------------------

    Attachment: final.attempt.to.catch.the.conflicts.diff

Stepan, Wow!  You were brave to take this on.  You got most of them and feel free to close this issue.  We'll get them as we go along anyway.

However, I've attempted to capture those that were missed in the patch final.*.diff in case you wish to apply it.


> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Stepan Mishura
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, assert.usage.combined.diff, combined.20060425.diff, final.attempt.to.catch.the.conflicts.diff, improved.assertequals.usage.diff, text.only.update.20060426.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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-353) improvements to junit test method usage

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

Mark Hindess updated HARMONY-353:
---------------------------------

    Attachment: combined.20060425.diff

An updated combined patch.

> improvements to junit test method usage
> ---------------------------------------
>
>          Key: HARMONY-353
>          URL: http://issues.apache.org/jira/browse/HARMONY-353
>      Project: Harmony
>         Type: Improvement

>   Components: Classlib
>     Reporter: Mark Hindess
>     Assignee: Stepan Mishura
>     Priority: Trivial
>  Attachments: 01.assertnull.diff, 02.assertequals.string.diff, 03.assertequals.constants.diff, 04.assertequals.char.constants.diff, 05.assertnotnull.diff, assert.usage.combined.diff, combined.20060425.diff, improved.assertequals.usage.diff
>
> While fixing the test in HARMONY-352, I found some confusing junit
> error messages.  They were things like:
>   error expected <actual> but got <expected>
> rather than:
>   error expected <expected> but got <actual>
> Because the arguments to the assertEquals method were the wrong way
> around.  The expected value should come first.  Anyway, I fixed these
> for that one test.  We should try to fix these when we find them and
> we should try to avoid adding any more.
> This JIRA is because I decided that it was reasonable to fix any method like:
>   assertEquals(..., <constant>);
> since a constant couldn't very well be the value being tested.

-- 
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