From 21dda4b6e9e0111c53881bcfedc9833d63fee5a6 Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 11 May 2005 09:33:34 +0000 Subject: [PATCH] src -> java5-src; note test target runs AsmModuleTests, not Loadtime5ModuleTests - prior bug. See newbuild.xml. --- loadtime5/build.xml | 2 +- .../org/aspectj/weaver/loadtime/Agent.java | 0 .../ClassPreProcessorAgentAdapter.java | 0 .../java5-testsrc/Loadtime515ModuleTests.java | 29 +++++++++++++++++ .../weaver/loadtime/LoadtimeTests.java | 26 +++++++++++++++ loadtime5/newbuild.xml | 6 ++++ loadtime5/testsrc/Loadtime5ModuleTests.java | 32 +++++++++++++++++++ 7 files changed, 94 insertions(+), 1 deletion(-) rename loadtime5/{src => java5-src}/org/aspectj/weaver/loadtime/Agent.java (100%) rename loadtime5/{src => java5-src}/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java (100%) create mode 100644 loadtime5/java5-testsrc/Loadtime515ModuleTests.java create mode 100644 loadtime5/java5-testsrc/org/aspectj/weaver/loadtime/LoadtimeTests.java create mode 100644 loadtime5/newbuild.xml create mode 100644 loadtime5/testsrc/Loadtime5ModuleTests.java diff --git a/loadtime5/build.xml b/loadtime5/build.xml index 97a1e2d99..41c07c1f1 100644 --- a/loadtime5/build.xml +++ b/loadtime5/build.xml @@ -28,7 +28,7 @@ - + diff --git a/loadtime5/src/org/aspectj/weaver/loadtime/Agent.java b/loadtime5/java5-src/org/aspectj/weaver/loadtime/Agent.java similarity index 100% rename from loadtime5/src/org/aspectj/weaver/loadtime/Agent.java rename to loadtime5/java5-src/org/aspectj/weaver/loadtime/Agent.java diff --git a/loadtime5/src/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java b/loadtime5/java5-src/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java similarity index 100% rename from loadtime5/src/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java rename to loadtime5/java5-src/org/aspectj/weaver/loadtime/ClassPreProcessorAgentAdapter.java diff --git a/loadtime5/java5-testsrc/Loadtime515ModuleTests.java b/loadtime5/java5-testsrc/Loadtime515ModuleTests.java new file mode 100644 index 000000000..91d3aece8 --- /dev/null +++ b/loadtime5/java5-testsrc/Loadtime515ModuleTests.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2005 Contributors. + * 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://eclipse.org/legal/epl-v10.html + * + * Contributors: (See CVS logs) + * + *******************************************************************************/ + +import org.aspectj.weaver.loadtime.LoadtimeTests; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + */ +public class Loadtime515ModuleTests extends TestCase { + + public static Test suite() { + TestSuite suite = new TestSuite(Loadtime515ModuleTests.class.getName()); + suite.addTestSuite(LoadtimeTests.class); + return suite; + } + +} diff --git a/loadtime5/java5-testsrc/org/aspectj/weaver/loadtime/LoadtimeTests.java b/loadtime5/java5-testsrc/org/aspectj/weaver/loadtime/LoadtimeTests.java new file mode 100644 index 000000000..f777b7ff5 --- /dev/null +++ b/loadtime5/java5-testsrc/org/aspectj/weaver/loadtime/LoadtimeTests.java @@ -0,0 +1,26 @@ +/* ******************************************************************* + * Copyright (c) 2005 Contributors. + * 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://eclipse.org/legal/epl-v10.html + * + * Contributors: + * Wes Isberg initial implementation + * ******************************************************************/ + + +package org.aspectj.weaver.loadtime; + +import java.lang.instrument.Instrumentation; + +import junit.framework.TestCase; + +public class LoadtimeTests extends TestCase { + + public void testPremain() throws Exception { + Class[] parmTypes = {String.class, Instrumentation.class }; + assertNotNull(Agent.class.getMethod("premain", parmTypes)); + } +} diff --git a/loadtime5/newbuild.xml b/loadtime5/newbuild.xml new file mode 100644 index 000000000..a2a3e6243 --- /dev/null +++ b/loadtime5/newbuild.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/loadtime5/testsrc/Loadtime5ModuleTests.java b/loadtime5/testsrc/Loadtime5ModuleTests.java new file mode 100644 index 000000000..231c80df6 --- /dev/null +++ b/loadtime5/testsrc/Loadtime5ModuleTests.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2005 Contributors. + * 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://eclipse.org/legal/epl-v10.html + * + * Contributors: (See CVS logs) + * + *******************************************************************************/ + +import org.aspectj.testing.util.TestUtil; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + */ +public class Loadtime5ModuleTests extends TestCase { + + public static Test suite() { + TestSuite suite = new TestSuite(Loadtime5ModuleTests.class.getName()); + TestUtil.loadTestsReflectively(suite, "Loadtime515ModuleTests", true); + return suite; + } + public static void main(String[] args) { + junit.textui.TestRunner.main(new String[] {Loadtime5ModuleTests.class.getName()}); + } + +} -- 2.39.5