Re: [eclipse-dev] [platform-releng-dev] enable assert during tests?
+1 for enabling -ea. As mentioned this will help JDT developers to use this more frequently to capture issues early.
Stephan Herrmann ---09/14/2019 05:06:41 PM---Hi I happened to realize that JDT tests are executed without the recommended "-ea"
From: Stephan Herrmann <stephan.herrmann@xxxxxxxxx>
To: platform-releng-dev@xxxxxxxxxxx, "General development mailing list of the Eclipse project." <eclipse-dev@xxxxxxxxxxx>
Date: 09/14/2019 05:06 PM
Subject: [EXTERNAL] [platform-releng-dev] enable assert during tests?
Sent by: platform-releng-dev-bounces@xxxxxxxxxxx
I happened to realize that JDT tests are executed without the recommended "-ea"
switch, both during gerrit tests and during production builds. I also took a few
samples of other tests and nowhere could I find "-ea".
Shouldn't this be globally enabled for all tests?
Bonus question: can this be set globally without interfering with individual
test bundles declaring <tycho.surefire.argLine>?
For test launches in the IDE this was fixed via https://bugs.eclipse.org/479553
so why do those builds behave differently?
Scanning the code I could not find an overwhelming number of assert statements
in productive code, but if we promise that those will be checked during tests
maybe we can encourage developers to make more use of this facility (despite how
it failed to deliver the promised support for design-by-contract ... remember
the long-time #1 hit in the Java Bug Parade? ...).
That said, in my case I was actually happy that one test run did NOT have "-ea"
because it detected one of the stupidest mistakes I had made: putting a
state-changing operation into "assert". Ergo: ideally between gerrit and
production builds one should *enable* assert, the other should *disable* to get
platform-releng-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit