On Jul 20, 2006, at 4:14 PM, Raymond Feng wrote:

If the purpose of the test case is to verify the "assert", I suggest that we use "ClassLoader.setClassAssertionStatus (targetClassName, true)" to make sure "assert" is on before the target class is initialized (for example, in a static block or TestCase.setUp()) instead of requesting the whole JVM to be launched with "-ea". Making sense?


I was thinking that when running testcases we want do assertions on across the entire VM so that any problems in peripheral classes would cause the test to fail. As in, all tests should pass if assertions are enabled so let's test that assumption so that we can't mistakenly run the tests with assertions off. IMO it is not a class-by-class thing.

In the maven build assertions are enabled in the surefire plugin so tests should always run with them on.

--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to