tests not reporting failures
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, May 27, 2003 01:17 PM

my tests are not reporting failures when I instantiate an object. ex. this returns an AssertationFailedError: public void testInt(){ try{ assertEquals(3, 7); }catch(Exception e){} } this does not return a failure public void testInt(){ try{ com.xxx.xxx.Point p = new com.xxx.xxx.Point(); assertEquals(3, 7); }catch(Exception e){} } any insight into why the bottom code returns without failures would be much appreciated cheers    More>>

my tests are not reporting failures when I instantiate an object.


ex.

this returns an AssertationFailedError:

			
public void testInt(){

try{

assertEquals(3, 7);

}catch(Exception e){}

}


this does not return a failure

			

public void testInt(){

try{

com.xxx.xxx.Point p = new com.xxx.xxx.Point();

assertEquals(3, 7);

}catch(Exception e){}

}


any insight into why the bottom code returns without failures would be much appreciated



cheers
   <<Less

Re: tests not reporting failures

Posted By:   Anonymous  
Posted On:   Tuesday, May 27, 2003 01:37 PM

I solved the issue by taking out the try/catch block and throwing an exception.
About | Sitemap | Contact