View | Details | Raw Unified | Return to bug 154690
Collapse All | Expand All

(-)src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java (+24 lines)
Lines 1494-1499 Link Here
1494
				+warnings,warnings.isEmpty());	
1494
				+warnings,warnings.isEmpty());	
1495
	}
1495
	}
1496
	
1496
	
1497
	public void testAdviceDidNotMatchUpdatedCorrectly_pr154690() {
1498
		initialiseProject("PR154690");
1499
		build("PR154690");
1500
		String expected = "advice defined in pkg.A has not been applied " +
1501
				"[Xlint:adviceDidNotMatch]";
1502
		assertEquals("warning message should be '" + expected + "' ",expected,
1503
				((IMessage)MyTaskListManager.getWarningMessages().get(0))
1504
					.getMessage());
1505
		// add the class - the advice should now match
1506
		alter("PR154690","inc1");
1507
		build("PR154690");
1508
		List warnings = MyTaskListManager.getWarningMessages();
1509
		assertTrue("There should be no warnings now the advice matches:\n"+warnings,
1510
				warnings.isEmpty());
1511
		// comment out the matching line and we should get the adviceDidNotMatch warning
1512
		alter("PR154690","inc2");
1513
		build("PR154690");
1514
		checkWasntFullBuild();
1515
		warnings = MyTaskListManager.getWarningMessages();
1516
		assertEquals("warning message should be '" + expected + "' ",expected,
1517
				((IMessage)MyTaskListManager.getWarningMessages().get(0))
1518
					.getMessage());		
1519
	}
1520
	
1497
	// --- helper code ---
1521
	// --- helper code ---
1498
	
1522
	
1499
	/**
1523
	/**
(-)multiIncremental/PR154690/base/pkg/A.aj (+12 lines)
Added Link Here
1
package pkg;
2
3
public aspect A {
4
5
	pointcut tracedPrint(String s): 
6
		call(void java.io.PrintStream.println(*)) 
7
		&& args(s) && !within(A);
8
9
	before(String s): tracedPrint(s) {
10
		System.out.println("got you: " + s + " ;)");
11
	}  
12
}
(-)multiIncremental/PR154690/inc2/pkg/C.java (+7 lines)
Added Link Here
1
package pkg;
2
3
public class C {
4
	public static void main(String[] args) {
5
		//System.out.println("main");
6
	}
7
}
(-)multiIncremental/PR154690/inc1/pkg/C.java (+7 lines)
Added Link Here
1
package pkg;
2
3
public class C {
4
	public static void main(String[] args) {
5
		System.out.println("main");
6
	}
7
}

Return to bug 154690