aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tracing
diff options
context:
space:
mode:
authormwebster <mwebster>2006-07-27 09:28:41 +0000
committermwebster <mwebster>2006-07-27 09:28:41 +0000
commit9783d6431916dfe07b00581c9ff62aa5d53fc414 (patch)
treebc41503399d77c621ff09df2854e42b5a32ecaba /tests/tracing
parent54f7bb4f25792e717eadf21421c81ae1dc8e0718 (diff)
downloadaspectj-9783d6431916dfe07b00581c9ff62aa5d53fc414.tar.gz
aspectj-9783d6431916dfe07b00581c9ff62aa5d53fc414.zip
Bug 150487 "Tracing and Logging Framework" (test default behaviour under 1.3 & 1.5)
Diffstat (limited to 'tests/tracing')
-rw-r--r--tests/tracing/DefaultTracingTest.java15
-rw-r--r--tests/tracing/HelloWorld.java7
-rw-r--r--tests/tracing/TracingTest.java16
-rw-r--r--tests/tracing/ant.xml27
-rw-r--r--tests/tracing/logging.properties1
5 files changed, 66 insertions, 0 deletions
diff --git a/tests/tracing/DefaultTracingTest.java b/tests/tracing/DefaultTracingTest.java
new file mode 100644
index 000000000..0b7c754be
--- /dev/null
+++ b/tests/tracing/DefaultTracingTest.java
@@ -0,0 +1,15 @@
+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
diff --git a/tests/tracing/HelloWorld.java b/tests/tracing/HelloWorld.java
new file mode 100644
index 000000000..8e5a1fdd7
--- /dev/null
+++ b/tests/tracing/HelloWorld.java
@@ -0,0 +1,7 @@
+public class HelloWorld {
+
+ public static void main (String[] args) throws Exception {
+ System.out.println("Hello World!");
+ }
+
+} \ No newline at end of file
diff --git a/tests/tracing/TracingTest.java b/tests/tracing/TracingTest.java
new file mode 100644
index 000000000..687dad7ef
--- /dev/null
+++ b/tests/tracing/TracingTest.java
@@ -0,0 +1,16 @@
+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
diff --git a/tests/tracing/ant.xml b/tests/tracing/ant.xml
new file mode 100644
index 000000000..f7852949e
--- /dev/null
+++ b/tests/tracing/ant.xml
@@ -0,0 +1,27 @@
+<!-- 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>
diff --git a/tests/tracing/logging.properties b/tests/tracing/logging.properties
new file mode 100644
index 000000000..0519ecba6
--- /dev/null
+++ b/tests/tracing/logging.properties
@@ -0,0 +1 @@
+ \ No newline at end of file