From 7a18d808a067c45dcf03bfc1d431a64441b62f1d Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 6 Oct 2004 08:40:36 +0000 Subject: tests for new java run fork attributes --- tests/ajcHarnessTests.xml | 22 ++++++++++++++++++++++ tests/harness/SystemPropertiesTest.java | 15 +++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 tests/harness/SystemPropertiesTest.java diff --git a/tests/ajcHarnessTests.xml b/tests/ajcHarnessTests.xml index d3534b01d..56c098a38 100644 --- a/tests/ajcHarnessTests.xml +++ b/tests/ajcHarnessTests.xml @@ -439,6 +439,28 @@ + + + + + + + + + + + + + + + diff --git a/tests/harness/SystemPropertiesTest.java b/tests/harness/SystemPropertiesTest.java new file mode 100644 index 000000000..d02985f88 --- /dev/null +++ b/tests/harness/SystemPropertiesTest.java @@ -0,0 +1,15 @@ + +public class SystemPropertiesTest { + public static void main(String[] args) { + boolean pass = Boolean.getBoolean("PASS"); + if (!pass) { + throw new Error("failed to get Boolean \\\"PASS\\\""); + } + String value = System.getProperty("name", null); + if (!"value".equals(value)) { + throw new Error("failed to get name=\"value\": " + value); + } + } +} + + -- cgit v1.2.3