aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2023-03-30 12:03:59 +0200
committerAlexander Kriegisch <Alexander@Kriegisch.name>2023-06-24 13:10:46 +0700
commita920edd998df600cfeff615ea5ce067ca8f4bb46 (patch)
tree19f737c78c6cc15c066bf2d142b5aec2fb395839
parent7618d3dea8bcb1e3a9bfd2ab67fe8f4d55db874b (diff)
downloadaspectj-a920edd998df600cfeff615ea5ce067ca8f4bb46.tar.gz
aspectj-a920edd998df600cfeff615ea5ce067ca8f4bb46.zip
Improve SystemPropertiesTest
- Fix quotation error in console output - Throw RuntimeException instead of Error. Maybe this helps to avoid the prominent error message listing in the GitHub build log, which always looks like something bad happened, even though it is simply an expected error. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
-rw-r--r--tests/harness/SystemPropertiesTest.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/harness/SystemPropertiesTest.java b/tests/harness/SystemPropertiesTest.java
index d02985f88..06a95699b 100644
--- a/tests/harness/SystemPropertiesTest.java
+++ b/tests/harness/SystemPropertiesTest.java
@@ -1,15 +1,13 @@
public class SystemPropertiesTest {
- public static void main(String[] args) {
+ public static void main(String[] args) {
boolean pass = Boolean.getBoolean("PASS");
if (!pass) {
- throw new Error("failed to get Boolean \\\"PASS\\\"");
+ throw new RuntimeException("failed to get Boolean \"PASS\"");
}
String value = System.getProperty("name", null);
if (!"value".equals(value)) {
- throw new Error("failed to get name=\"value\": " + value);
+ throw new RuntimeException("failed to get name=\"value\": " + value);
}
}
}
-
-