]> source.dussan.org Git - aspectj.git/commitdiff
pr 46671 ensure we don't look for source on the claspath (Andy's fix)
authoracolyer <acolyer>
Fri, 9 Jan 2004 09:59:28 +0000 (09:59 +0000)
committeracolyer <acolyer>
Fri, 9 Jan 2004 09:59:28 +0000 (09:59 +0000)
tests/ajcTests.xml
tests/bugs/faultingInSource/SampleClass.java [new file with mode: 0644]
tests/bugs/faultingInSource/SimpleTracing.java [new file with mode: 0644]

index c99ab74c692386444f7db37978a547e18243fe5f..a3553d1fe3108cf7b2b14aac34a432bd2460ec00 100644 (file)
                        <message kind="error" line="23" />
                </compile>
        </ajc-test>
-    
+
+   <ajc-test dir="bugs/faultingInSource" pr="46671"
+      title="Ensure we don't look for source on the classpath when binary not found">
+        <compile files="SimpleTracing.java" classpath="." options="-verbose">
+                 <message kind="warning" line="4" text="no match for this type name: SampleClass"/>
+        </compile>
+    </ajc-test>   
 </suite>
diff --git a/tests/bugs/faultingInSource/SampleClass.java b/tests/bugs/faultingInSource/SampleClass.java
new file mode 100644 (file)
index 0000000..e5e7363
--- /dev/null
@@ -0,0 +1,13 @@
+public class SampleClass
+{
+       void foo (String s)
+       {
+               System.out.println ("Printing " + s);
+       }
+       
+       public static void main(String[] args)
+       {
+               SampleClass sc = new SampleClass();
+               sc.foo ("hahaha");
+       }
+}
diff --git a/tests/bugs/faultingInSource/SimpleTracing.java b/tests/bugs/faultingInSource/SimpleTracing.java
new file mode 100644 (file)
index 0000000..231cac7
--- /dev/null
@@ -0,0 +1,15 @@
+aspect SimpleTracing
+{
+       pointcut traceCall():
+               call (void SampleClass.foo(..));
+               
+       before(): traceCall()
+       {
+               System.out.println ("Entering: " + thisJoinPoint);
+       }
+       
+       after(): traceCall()
+       {
+               System.out.println ("Exiting: " + thisJoinPoint);
+       }
+}