import org.aspectj.systemtest.options.OptionsTests;
import org.aspectj.systemtest.pre10x.AjcPre10xTests;
import org.aspectj.systemtest.serialVerUID.SUIDTests;
+import org.aspectj.systemtest.tracing.TracingTests;
import org.aspectj.systemtest.xlint.XLintTests;
/**
//suite.addTest(PureJavaTests.class);
suite.addTest(SUIDTests.suite());
suite.addTest(XLintTests.suite());
+ suite.addTest(TracingTests.suite());
//$JUnit-END$
return suite;
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2006 IBM Corporation and others.
+ * 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
+ *
+ * Contributors:
+ * Matthew Webster - initial implementation
+ *******************************************************************************/
+package org.aspectj.systemtest.tracing;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+public class TracingTests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(TracingTests.class);
+ }
+
+ protected File getSpecFile() {
+ return new File("../tests/src/org/aspectj/systemtest/tracing/tracing.xml");
+ }
+
+ public void testTracing () {
+ runTest("Tracing");
+ }
+
+ public void testDefaultTracing () {
+ runTest("Default tracing");
+ }
+
+}
--- /dev/null
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<!-- Tracing Tests -->
+<suite>
+
+ <ajc-test dir="tracing" title="Tracing" keywords="tracing">
+ <compile
+ files="TracingTest.java"
+ />
+ <ant file="ant.xml" target="Tracing" verbose="true"/>
+ </ajc-test>
+
+ <ajc-test dir="tracing" title="Default tracing" keywords="tracing">
+ <compile
+ files="DefaultTracingTest.java"
+ />
+ <ant file="ant.xml" target="Default tracing" verbose="true"/>
+ </ajc-test>
+
+</suite>
--- /dev/null
+import org.aspectj.weaver.tools.*;
+
+public class DefaultTracingTest {
+
+ public void test () {
+ TraceFactory factory = new DefaultTraceFactory();
+ Trace trace = factory.getTrace(getClass());
+ System.out.println("? DefaultTracingTest.main() trace=" + trace);
+ }
+
+ public static void main (String[] args) {
+ new DefaultTracingTest().test();
+ }
+
+}
\ No newline at end of file
--- /dev/null
+public class HelloWorld {
+
+ public static void main (String[] args) throws Exception {
+ System.out.println("Hello World!");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+import org.aspectj.weaver.tools.Trace;
+import org.aspectj.weaver.tools.TraceFactory;
+
+public class TracingTest {
+
+ public void test () {
+ TraceFactory factory = TraceFactory.getTraceFactory();
+ Trace trace = factory.getTrace(getClass());
+ System.out.println("? TracingTest.main() trace=" + trace);
+ }
+
+ public static void main (String[] args) {
+ new TracingTest().test();
+ }
+
+}
\ No newline at end of file
--- /dev/null
+<!-- ajc-ant script, not to be used from Ant commant line - see AntSpec -->
+<project name="tracing">
+
+ <!-- using this we can debug the forked VM -->
+ <property
+ name="jdwp"
+ value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>
+
+ <target name="Tracing">
+ <java fork="yes" classname="TracingTest" failonerror="yes">
+ <classpath refid="aj.path"/>
+ <!-- use META-INF/aop.xml style -->
+<!-- <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>-->
+<!-- <jvmarg line="${jdwp}"/>-->
+ </java>
+ </target>
+
+ <target name="Default tracing">
+ <java fork="yes" classname="DefaultTracingTest" failonerror="yes">
+ <classpath refid="aj.path"/>
+ <!-- use META-INF/aop.xml style -->
+<!-- <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>-->
+<!-- <jvmarg line="${jdwp}"/>-->
+ </java>
+ </target>
+
+</project>
--- /dev/null
+
\ No newline at end of file