diff options
author | Andy Clement <aclement@pivotal.io> | 2019-01-30 16:55:38 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2019-01-30 16:55:38 -0800 |
commit | 2b24e7377da7c849fe7f9f4fa06a701664f9d27d (patch) | |
tree | 64c36c8fcf29633af7a5e2f7405b94cbec629ca8 /tests/src/test/java/org/aspectj/systemtest/options | |
parent | d60de8d0b3e62eb36b612a824bb9345d865c0155 (diff) | |
download | aspectj-2b24e7377da7c849fe7f9f4fa06a701664f9d27d.tar.gz aspectj-2b24e7377da7c849fe7f9f4fa06a701664f9d27d.zip |
mavenizing tests - wip
Diffstat (limited to 'tests/src/test/java/org/aspectj/systemtest/options')
3 files changed, 91 insertions, 0 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/options/OptionsTests.java b/tests/src/test/java/org/aspectj/systemtest/options/OptionsTests.java new file mode 100644 index 000000000..80710a6ed --- /dev/null +++ b/tests/src/test/java/org/aspectj/systemtest/options/OptionsTests.java @@ -0,0 +1,44 @@ +/* ******************************************************************* + * Copyright (c) 2004 IBM Corporation + * All rights reserved. + * This program and the accompanying materials are made available + * under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * ******************************************************************/ +package org.aspectj.systemtest.options; + +import java.io.File; +import junit.framework.Test; +import org.aspectj.testing.XMLBasedAjcTestCase; + +public class OptionsTests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(OptionsTests.class); + } + + protected File getSpecFile() { + return getClassResource("options.xml"); + } + + + public void test001(){ + runTest("options -warn:deprecation"); + } + + public void test002(){ + runTest("options -warn:deprecation not enabled"); + } + + public void test003(){ + runTest("setting -warn:constructorName works"); + } + + public void test004(){ + runTest("-deprecation not working?"); + } + +} + diff --git a/tests/src/test/java/org/aspectj/systemtest/options/options-tests.xml b/tests/src/test/java/org/aspectj/systemtest/options/options-tests.xml new file mode 100644 index 000000000..d109cd2d0 --- /dev/null +++ b/tests/src/test/java/org/aspectj/systemtest/options/options-tests.xml @@ -0,0 +1,37 @@ +<!-- Options Tests --> + + <!-- .................................... option tests --> + <!-- .................................... -warn tests --> + <ajc-test dir="options/deprecated" + title="options -warn:deprecation"> + <compile files="WarnDeprecated.java,OldStuff.java" + options="!eclipse,-warn:deprecation"> + <message kind="warning" line="10"/> + </compile> + </ajc-test> + + <ajc-test dir="options/deprecated" + title="options -warn:deprecation not enabled"> + <compile files="WarnDeprecated.java,OldStuff.java" + options="!eclipse"> + </compile> + </ajc-test> + + + <ajc-test dir="harness" + title="setting -warn:constructorName works"> + <compile files="ConstructorNameWarning.java" + options="-warn:constructorName"> + <message kind="warning" line="5" text="constructor name"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs/deprecated" pr="54098" + title="-deprecation not working?" > + <compile files="Deprecation.java, Deprecated.java" options="-deprecation"> + <message kind="warning" line="5"/> + <message kind="warning" line="6"/> + </compile> + </ajc-test> + +
\ No newline at end of file diff --git a/tests/src/test/java/org/aspectj/systemtest/options/options.xml b/tests/src/test/java/org/aspectj/systemtest/options/options.xml new file mode 100644 index 000000000..d877da040 --- /dev/null +++ b/tests/src/test/java/org/aspectj/systemtest/options/options.xml @@ -0,0 +1,10 @@ +<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[ +<!ENTITY tests SYSTEM "../tests/src/org/aspectj/systemtest/options/options-tests.xml"> +]> +<!-- Options Tests --> + +<suite> + +&tests; + +</suite>
\ No newline at end of file |