Project: JDT
Bug 45408 Enable assertions during unit tests [JUnit]
Reported: 2003-10-22 14:49:08 | Status: verified fixed

As I understand it, Java 1.4 assertions are disabled by default unless the vm argument "-ea" exists. I would like very much for Eclipse to have an option to always enable assertions while running my unit tests from the "run as... JUnit test" menu item. I realize that I can define a runtime configuration and specify the parameters there, but if this were the "default", that would be very helpful.

Files changed in fix:
org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitMessages.java org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitPreferencesConstants.java org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JunitPreferenceInitializer.java org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/AssertionVMArg.java org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitTabGroup.java org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitMessages.java org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencePage.java org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencesConstants.java org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JunitPreferenceInitializer.java org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/JUnitJUnitTests.java org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/junit/tests/TestEnableAssertions.java