diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-08-31 14:27:45 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-08-31 14:28:06 +0300 |
commit | 594a21116845ae2aacc8c40fd76ee50b84d1e968 (patch) | |
tree | 0ddd70c861227e3badcba1f40907b0b9b65a738f /uitest/src/com/vaadin/launcher | |
parent | dc8bc6119c1bd019600559db552ec26b4db2ec54 (diff) | |
download | vaadin-framework-594a21116845ae2aacc8c40fd76ee50b84d1e968.tar.gz vaadin-framework-594a21116845ae2aacc8c40fd76ee50b84d1e968.zip |
Run tests with assertions enabled (#9450)
Diffstat (limited to 'uitest/src/com/vaadin/launcher')
-rw-r--r-- | uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java b/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java index 6162820dac..f45aac8173 100644 --- a/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java +++ b/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java @@ -54,6 +54,8 @@ public class DevelopmentServerLauncher { public static void main(String[] args) { System.setProperty("java.awt.headless", "true"); + assertAssertionsEnabled(); + // Pass-through of arguments for Jetty final Map<String, String> serverArgs = parseArguments(args); @@ -88,6 +90,18 @@ public class DevelopmentServerLauncher { } } + private static void assertAssertionsEnabled() { + try { + assert false; + + throw new RuntimeException("You should run " + + DevelopmentServerLauncher.class.getSimpleName() + + " with assertions enabled. Add -ea as a VM argument."); + } catch (AssertionError e) { + // All is fine + } + } + /** * Run the server with specified arguments. * |