Nice/src/nice/tools/unit api.nice,1.2,1.3

Daniel Bonniot <[email protected]>
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/nice/tools/unit
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14379/src/nice/tools/unit

Modified Files:
	api.nice 
Log Message:
Cleanup.


Index: api.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/unit/api.nice,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** api.nice	2 Jul 2004 19:31:01 -0000	1.2
--- api.nice	24 Feb 2005 15:11:00 -0000	1.3
***************
*** 8,12 ****
  			?String classpath = null)
  {
!   let classloader = classpath == null 
      ? ClassLoader.getSystemClassLoader()
      : classloaderFromClasspath(notNull(classpath));
--- 8,12 ----
  			?String classpath = null)
  {
!   let classloader = classpath == null
      ? ClassLoader.getSystemClassLoader()
      : classloaderFromClasspath(notNull(classpath));
***************
*** 58,62 ****
  }
  
! boolean isTestMethod(Method m) = 
    m.getName().startsWith("_test") && m.getParameterTypes().length == 0;
  
--- 58,62 ----
  }
  
! boolean isTestMethod(Method m) =
    m.getName().startsWith("_test") && m.getParameterTypes().length == 0;
  
***************
*** 64,79 ****
  {
    let name = m.getDeclaringClass().getName() + "." + m.getName();
!   
    listener.start(name);
!   try 
    {
      m.invoke(null, null);
!   } 
!   catch (InvocationTargetException e) 
    {
      let cause = e.getTargetException();
      listener.failure(name, cause);
    }
!   finally 
    {
      listener.end(name);
--- 64,79 ----
  {
    let name = m.getDeclaringClass().getName() + "." + m.getName();
! 
    listener.start(name);
!   try
    {
      m.invoke(null, null);
!   }
!   catch (InvocationTargetException e)
    {
      let cause = e.getTargetException();
      listener.failure(name, cause);
    }
!   finally
    {
      listener.end(name);
***************
*** 85,94 ****
    let index = source.lastIndexOf(c);
    if (index == -1) return source;
!   
    StringBuffer res = new StringBuffer(source.length() + by.length() - 1);
    res.append(source.substring(0, index));
    res.append(by);
    res.append(source.substring(index + 1));
!   
    return res.toString();
  }
--- 85,94 ----
    let index = source.lastIndexOf(c);
    if (index == -1) return source;
! 
    StringBuffer res = new StringBuffer(source.length() + by.length() - 1);
    res.append(source.substring(0, index));
    res.append(by);
    res.append(source.substring(index + 1));
! 
    return res.toString();
  }



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.