]> source.dussan.org Git - aspectj.git/commitdiff
additional incremental tests : bugs 54622, 54621
authoracolyer <acolyer>
Thu, 5 Aug 2004 13:32:26 +0000 (13:32 +0000)
committeracolyer <acolyer>
Thu, 5 Aug 2004 13:32:26 +0000 (13:32 +0000)
43 files changed:
tests/incrementalju/injarTests/classAdded/MyJar.jar [new file with mode: 0644]
tests/incrementalju/injarTests/classAdded/changes/MyJar.20.jar [new file with mode: 0644]
tests/incrementalju/injarTests/classAdded/src/World.java [new file with mode: 0644]
tests/incrementalju/injarTests/classRemoved/MyJar.jar [new file with mode: 0644]
tests/incrementalju/injarTests/classRemoved/changes/MyJar.20.jar [new file with mode: 0644]
tests/incrementalju/injarTests/classRemoved/src/World.java [new file with mode: 0644]
tests/incrementalju/injarTests/src/Hello.class [new file with mode: 0644]
tests/incrementalju/injarTests/src/Hello.java [new file with mode: 0644]
tests/incrementalju/injarTests/src/Hello2.class [new file with mode: 0644]
tests/incrementalju/injarTests/src/Hello2.java [new file with mode: 0644]
tests/incrementalju/injarTests/src/HelloHello2.jar [new file with mode: 0644]
tests/incrementalju/injarTests/src/HelloOnly.jar [new file with mode: 0644]
tests/incrementalju/injarTests/src/MyJar.jar [new file with mode: 0644]
tests/incrementalju/inpathDirTests/classAdded/changes/Hello2.20.class [new file with mode: 0644]
tests/incrementalju/inpathDirTests/classAdded/indir/Hello.class [new file with mode: 0644]
tests/incrementalju/inpathDirTests/classAdded/src/World.java [new file with mode: 0644]
tests/incrementalju/inpathDirTests/classRemoved/indir/Hello.class [new file with mode: 0644]
tests/incrementalju/inpathDirTests/classRemoved/indir/Hello2.class [new file with mode: 0644]
tests/incrementalju/inpathDirTests/classRemoved/src/World.java [new file with mode: 0644]
tests/incrementalju/inpathDirTests/classUpdated/changes/Hello.20.class [new file with mode: 0644]
tests/incrementalju/inpathDirTests/classUpdated/indir/Hello.class [new file with mode: 0644]
tests/incrementalju/inpathDirTests/classUpdated/src/World.java [new file with mode: 0644]
tests/incrementalju/inpathDirTests/src/Hello.20.class [new file with mode: 0644]
tests/incrementalju/inpathDirTests/src/Hello.20.java [new file with mode: 0644]
tests/incrementalju/inpathDirTests/src/Hello.class [new file with mode: 0644]
tests/incrementalju/inpathDirTests/src/Hello.java [new file with mode: 0644]
tests/incrementalju/inpathDirTests/src/Hello2.class [new file with mode: 0644]
tests/incrementalju/inpathDirTests/src/Hello2.java [new file with mode: 0644]
tests/incrementalju/resourceTests/resourceAdded/MyJar.jar [new file with mode: 0644]
tests/incrementalju/resourceTests/resourceAdded/changes/AResourceFile.txt [new file with mode: 0644]
tests/incrementalju/resourceTests/resourceAdded/changes/MyJar.20.jar [new file with mode: 0644]
tests/incrementalju/resourceTests/resourceAdded/indir/Hello.class [new file with mode: 0644]
tests/incrementalju/resourceTests/resourceAdded/src/World.java [new file with mode: 0644]
tests/incrementalju/resourceTests/resourceRemoved/MyJar.jar [new file with mode: 0644]
tests/incrementalju/resourceTests/resourceRemoved/changes/AResourceFile.txt [new file with mode: 0644]
tests/incrementalju/resourceTests/resourceRemoved/changes/MyJar.20.jar [new file with mode: 0644]
tests/incrementalju/resourceTests/resourceRemoved/src/World.java [new file with mode: 0644]
tests/incrementalju/resourceTests/src/AResourceFile.txt [new file with mode: 0644]
tests/incrementalju/resourceTests/src/Hello.class [new file with mode: 0644]
tests/incrementalju/resourceTests/src/Hello.java [new file with mode: 0644]
tests/incrementalju/resourceTests/src/MyJar.jar [new file with mode: 0644]
tests/src/org/aspectj/systemtest/incremental/IncrementalTests.java
tests/src/org/aspectj/systemtest/incremental/incremental-junit-tests.xml

diff --git a/tests/incrementalju/injarTests/classAdded/MyJar.jar b/tests/incrementalju/injarTests/classAdded/MyJar.jar
new file mode 100644 (file)
index 0000000..9e4f835
Binary files /dev/null and b/tests/incrementalju/injarTests/classAdded/MyJar.jar differ
diff --git a/tests/incrementalju/injarTests/classAdded/changes/MyJar.20.jar b/tests/incrementalju/injarTests/classAdded/changes/MyJar.20.jar
new file mode 100644 (file)
index 0000000..2146405
Binary files /dev/null and b/tests/incrementalju/injarTests/classAdded/changes/MyJar.20.jar differ
diff --git a/tests/incrementalju/injarTests/classAdded/src/World.java b/tests/incrementalju/injarTests/classAdded/src/World.java
new file mode 100644 (file)
index 0000000..a5d23f1
--- /dev/null
@@ -0,0 +1,19 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+
+public aspect World {
+       
+       after() returning : execution(* Hello.*(..)) {
+           System.out.println("World");
+       }
+}
\ No newline at end of file
diff --git a/tests/incrementalju/injarTests/classRemoved/MyJar.jar b/tests/incrementalju/injarTests/classRemoved/MyJar.jar
new file mode 100644 (file)
index 0000000..2146405
Binary files /dev/null and b/tests/incrementalju/injarTests/classRemoved/MyJar.jar differ
diff --git a/tests/incrementalju/injarTests/classRemoved/changes/MyJar.20.jar b/tests/incrementalju/injarTests/classRemoved/changes/MyJar.20.jar
new file mode 100644 (file)
index 0000000..9e4f835
Binary files /dev/null and b/tests/incrementalju/injarTests/classRemoved/changes/MyJar.20.jar differ
diff --git a/tests/incrementalju/injarTests/classRemoved/src/World.java b/tests/incrementalju/injarTests/classRemoved/src/World.java
new file mode 100644 (file)
index 0000000..a5d23f1
--- /dev/null
@@ -0,0 +1,19 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+
+public aspect World {
+       
+       after() returning : execution(* Hello.*(..)) {
+           System.out.println("World");
+       }
+}
\ No newline at end of file
diff --git a/tests/incrementalju/injarTests/src/Hello.class b/tests/incrementalju/injarTests/src/Hello.class
new file mode 100644 (file)
index 0000000..dd227ec
Binary files /dev/null and b/tests/incrementalju/injarTests/src/Hello.class differ
diff --git a/tests/incrementalju/injarTests/src/Hello.java b/tests/incrementalju/injarTests/src/Hello.java
new file mode 100644 (file)
index 0000000..8d16387
--- /dev/null
@@ -0,0 +1,22 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+/**
+ * Used to generate Hello.class that is placed in indir for these resource tests.
+ */
+public class Hello {
+       
+       public static void main(String[] args) {
+               System.out.println("hello");
+       }
+       
+}
\ No newline at end of file
diff --git a/tests/incrementalju/injarTests/src/Hello2.class b/tests/incrementalju/injarTests/src/Hello2.class
new file mode 100644 (file)
index 0000000..eb516c6
Binary files /dev/null and b/tests/incrementalju/injarTests/src/Hello2.class differ
diff --git a/tests/incrementalju/injarTests/src/Hello2.java b/tests/incrementalju/injarTests/src/Hello2.java
new file mode 100644 (file)
index 0000000..c174af9
--- /dev/null
@@ -0,0 +1,22 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+/**
+ * Used to generate Hello2.class that is placed in MyJar.jar for these tests.
+ */
+public class Hello2 {
+       
+       public static void main(String[] args) {
+               System.out.println("hello");
+       }
+       
+}
\ No newline at end of file
diff --git a/tests/incrementalju/injarTests/src/HelloHello2.jar b/tests/incrementalju/injarTests/src/HelloHello2.jar
new file mode 100644 (file)
index 0000000..2146405
Binary files /dev/null and b/tests/incrementalju/injarTests/src/HelloHello2.jar differ
diff --git a/tests/incrementalju/injarTests/src/HelloOnly.jar b/tests/incrementalju/injarTests/src/HelloOnly.jar
new file mode 100644 (file)
index 0000000..9e4f835
Binary files /dev/null and b/tests/incrementalju/injarTests/src/HelloOnly.jar differ
diff --git a/tests/incrementalju/injarTests/src/MyJar.jar b/tests/incrementalju/injarTests/src/MyJar.jar
new file mode 100644 (file)
index 0000000..2b90960
Binary files /dev/null and b/tests/incrementalju/injarTests/src/MyJar.jar differ
diff --git a/tests/incrementalju/inpathDirTests/classAdded/changes/Hello2.20.class b/tests/incrementalju/inpathDirTests/classAdded/changes/Hello2.20.class
new file mode 100644 (file)
index 0000000..eb516c6
Binary files /dev/null and b/tests/incrementalju/inpathDirTests/classAdded/changes/Hello2.20.class differ
diff --git a/tests/incrementalju/inpathDirTests/classAdded/indir/Hello.class b/tests/incrementalju/inpathDirTests/classAdded/indir/Hello.class
new file mode 100644 (file)
index 0000000..dd227ec
Binary files /dev/null and b/tests/incrementalju/inpathDirTests/classAdded/indir/Hello.class differ
diff --git a/tests/incrementalju/inpathDirTests/classAdded/src/World.java b/tests/incrementalju/inpathDirTests/classAdded/src/World.java
new file mode 100644 (file)
index 0000000..a5d23f1
--- /dev/null
@@ -0,0 +1,19 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+
+public aspect World {
+       
+       after() returning : execution(* Hello.*(..)) {
+           System.out.println("World");
+       }
+}
\ No newline at end of file
diff --git a/tests/incrementalju/inpathDirTests/classRemoved/indir/Hello.class b/tests/incrementalju/inpathDirTests/classRemoved/indir/Hello.class
new file mode 100644 (file)
index 0000000..dd227ec
Binary files /dev/null and b/tests/incrementalju/inpathDirTests/classRemoved/indir/Hello.class differ
diff --git a/tests/incrementalju/inpathDirTests/classRemoved/indir/Hello2.class b/tests/incrementalju/inpathDirTests/classRemoved/indir/Hello2.class
new file mode 100644 (file)
index 0000000..eb516c6
Binary files /dev/null and b/tests/incrementalju/inpathDirTests/classRemoved/indir/Hello2.class differ
diff --git a/tests/incrementalju/inpathDirTests/classRemoved/src/World.java b/tests/incrementalju/inpathDirTests/classRemoved/src/World.java
new file mode 100644 (file)
index 0000000..a5d23f1
--- /dev/null
@@ -0,0 +1,19 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+
+public aspect World {
+       
+       after() returning : execution(* Hello.*(..)) {
+           System.out.println("World");
+       }
+}
\ No newline at end of file
diff --git a/tests/incrementalju/inpathDirTests/classUpdated/changes/Hello.20.class b/tests/incrementalju/inpathDirTests/classUpdated/changes/Hello.20.class
new file mode 100644 (file)
index 0000000..3233931
Binary files /dev/null and b/tests/incrementalju/inpathDirTests/classUpdated/changes/Hello.20.class differ
diff --git a/tests/incrementalju/inpathDirTests/classUpdated/indir/Hello.class b/tests/incrementalju/inpathDirTests/classUpdated/indir/Hello.class
new file mode 100644 (file)
index 0000000..dd227ec
Binary files /dev/null and b/tests/incrementalju/inpathDirTests/classUpdated/indir/Hello.class differ
diff --git a/tests/incrementalju/inpathDirTests/classUpdated/src/World.java b/tests/incrementalju/inpathDirTests/classUpdated/src/World.java
new file mode 100644 (file)
index 0000000..a5d23f1
--- /dev/null
@@ -0,0 +1,19 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+
+public aspect World {
+       
+       after() returning : execution(* Hello.*(..)) {
+           System.out.println("World");
+       }
+}
\ No newline at end of file
diff --git a/tests/incrementalju/inpathDirTests/src/Hello.20.class b/tests/incrementalju/inpathDirTests/src/Hello.20.class
new file mode 100644 (file)
index 0000000..3233931
Binary files /dev/null and b/tests/incrementalju/inpathDirTests/src/Hello.20.class differ
diff --git a/tests/incrementalju/inpathDirTests/src/Hello.20.java b/tests/incrementalju/inpathDirTests/src/Hello.20.java
new file mode 100644 (file)
index 0000000..f4ebfd7
--- /dev/null
@@ -0,0 +1,22 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+/**
+ * Used to generate Hello.class that is placed in indir for these resource tests.
+ */
+public class Hello {
+       
+       public static void main(String[] args) {
+               System.out.println("updated hello");
+       }
+       
+}
diff --git a/tests/incrementalju/inpathDirTests/src/Hello.class b/tests/incrementalju/inpathDirTests/src/Hello.class
new file mode 100644 (file)
index 0000000..dd227ec
Binary files /dev/null and b/tests/incrementalju/inpathDirTests/src/Hello.class differ
diff --git a/tests/incrementalju/inpathDirTests/src/Hello.java b/tests/incrementalju/inpathDirTests/src/Hello.java
new file mode 100644 (file)
index 0000000..8d16387
--- /dev/null
@@ -0,0 +1,22 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+/**
+ * Used to generate Hello.class that is placed in indir for these resource tests.
+ */
+public class Hello {
+       
+       public static void main(String[] args) {
+               System.out.println("hello");
+       }
+       
+}
\ No newline at end of file
diff --git a/tests/incrementalju/inpathDirTests/src/Hello2.class b/tests/incrementalju/inpathDirTests/src/Hello2.class
new file mode 100644 (file)
index 0000000..eb516c6
Binary files /dev/null and b/tests/incrementalju/inpathDirTests/src/Hello2.class differ
diff --git a/tests/incrementalju/inpathDirTests/src/Hello2.java b/tests/incrementalju/inpathDirTests/src/Hello2.java
new file mode 100644 (file)
index 0000000..c174af9
--- /dev/null
@@ -0,0 +1,22 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+/**
+ * Used to generate Hello2.class that is placed in MyJar.jar for these tests.
+ */
+public class Hello2 {
+       
+       public static void main(String[] args) {
+               System.out.println("hello");
+       }
+       
+}
\ No newline at end of file
diff --git a/tests/incrementalju/resourceTests/resourceAdded/MyJar.jar b/tests/incrementalju/resourceTests/resourceAdded/MyJar.jar
new file mode 100644 (file)
index 0000000..2b90960
Binary files /dev/null and b/tests/incrementalju/resourceTests/resourceAdded/MyJar.jar differ
diff --git a/tests/incrementalju/resourceTests/resourceAdded/changes/AResourceFile.txt b/tests/incrementalju/resourceTests/resourceAdded/changes/AResourceFile.txt
new file mode 100644 (file)
index 0000000..271f1c4
--- /dev/null
@@ -0,0 +1 @@
+Here is some text...
\ No newline at end of file
diff --git a/tests/incrementalju/resourceTests/resourceAdded/changes/MyJar.20.jar b/tests/incrementalju/resourceTests/resourceAdded/changes/MyJar.20.jar
new file mode 100644 (file)
index 0000000..ff932e3
Binary files /dev/null and b/tests/incrementalju/resourceTests/resourceAdded/changes/MyJar.20.jar differ
diff --git a/tests/incrementalju/resourceTests/resourceAdded/indir/Hello.class b/tests/incrementalju/resourceTests/resourceAdded/indir/Hello.class
new file mode 100644 (file)
index 0000000..dd227ec
Binary files /dev/null and b/tests/incrementalju/resourceTests/resourceAdded/indir/Hello.class differ
diff --git a/tests/incrementalju/resourceTests/resourceAdded/src/World.java b/tests/incrementalju/resourceTests/resourceAdded/src/World.java
new file mode 100644 (file)
index 0000000..a5d23f1
--- /dev/null
@@ -0,0 +1,19 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+
+public aspect World {
+       
+       after() returning : execution(* Hello.*(..)) {
+           System.out.println("World");
+       }
+}
\ No newline at end of file
diff --git a/tests/incrementalju/resourceTests/resourceRemoved/MyJar.jar b/tests/incrementalju/resourceTests/resourceRemoved/MyJar.jar
new file mode 100644 (file)
index 0000000..ff932e3
Binary files /dev/null and b/tests/incrementalju/resourceTests/resourceRemoved/MyJar.jar differ
diff --git a/tests/incrementalju/resourceTests/resourceRemoved/changes/AResourceFile.txt b/tests/incrementalju/resourceTests/resourceRemoved/changes/AResourceFile.txt
new file mode 100644 (file)
index 0000000..271f1c4
--- /dev/null
@@ -0,0 +1 @@
+Here is some text...
\ No newline at end of file
diff --git a/tests/incrementalju/resourceTests/resourceRemoved/changes/MyJar.20.jar b/tests/incrementalju/resourceTests/resourceRemoved/changes/MyJar.20.jar
new file mode 100644 (file)
index 0000000..2b90960
Binary files /dev/null and b/tests/incrementalju/resourceTests/resourceRemoved/changes/MyJar.20.jar differ
diff --git a/tests/incrementalju/resourceTests/resourceRemoved/src/World.java b/tests/incrementalju/resourceTests/resourceRemoved/src/World.java
new file mode 100644 (file)
index 0000000..a5d23f1
--- /dev/null
@@ -0,0 +1,19 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+
+public aspect World {
+       
+       after() returning : execution(* Hello.*(..)) {
+           System.out.println("World");
+       }
+}
\ No newline at end of file
diff --git a/tests/incrementalju/resourceTests/src/AResourceFile.txt b/tests/incrementalju/resourceTests/src/AResourceFile.txt
new file mode 100644 (file)
index 0000000..271f1c4
--- /dev/null
@@ -0,0 +1 @@
+Here is some text...
\ No newline at end of file
diff --git a/tests/incrementalju/resourceTests/src/Hello.class b/tests/incrementalju/resourceTests/src/Hello.class
new file mode 100644 (file)
index 0000000..dd227ec
Binary files /dev/null and b/tests/incrementalju/resourceTests/src/Hello.class differ
diff --git a/tests/incrementalju/resourceTests/src/Hello.java b/tests/incrementalju/resourceTests/src/Hello.java
new file mode 100644 (file)
index 0000000..8d16387
--- /dev/null
@@ -0,0 +1,22 @@
+/* *******************************************************************
+ * Copyright (c) 2004 IBM Corporation
+ * All rights reserved. 
+ * This program and the accompanying materials are made available 
+ * under the terms of the Common Public License v1.0 
+ * which accompanies this distribution and is available at 
+ * http://www.eclipse.org/legal/cpl-v10.html 
+ *  
+ * Contributors: 
+ *     Adrian Colyer, 
+ * ******************************************************************/
+
+/**
+ * Used to generate Hello.class that is placed in indir for these resource tests.
+ */
+public class Hello {
+       
+       public static void main(String[] args) {
+               System.out.println("hello");
+       }
+       
+}
\ No newline at end of file
diff --git a/tests/incrementalju/resourceTests/src/MyJar.jar b/tests/incrementalju/resourceTests/src/MyJar.jar
new file mode 100644 (file)
index 0000000..2b90960
Binary files /dev/null and b/tests/incrementalju/resourceTests/src/MyJar.jar differ
index fd7c1fa5ee132c09599da9e096923e9d041fa86d..abefc41f3bd78b00d99b501e388b12be2463b648 100644 (file)
@@ -138,7 +138,94 @@ public class IncrementalTests extends org.aspectj.testing.XMLBasedAjcTestCase {
     copyFileAndDoIncrementalBuild("changes/Aspect.20.java","src/Aspect.java",messageSpec);
     run("Main");
   }
+  
+  public void testIncrementalResourceAdditionToInPath() throws Exception {
+      runTest("incremental with addition of resource to inpath directory");
+      RunResult result = run("Hello");
+      assertTrue("Should have been advised",result.getStdOut().indexOf("World") != -1);
+      nextIncrement(false);
+      assertFalse("Resource file should not exist yet",new File(ajc.getSandboxDirectory(),"AResourceFile.txt").exists());
+      copyFileAndDoIncrementalBuild("changes/AResourceFile.txt", "indir/AResourceFile.txt");
+      // resources are *NOT* copied from inpath directories
+      assertFalse("Resource file should not exist yet",new File(ajc.getSandboxDirectory(),"AResourceFile.txt").exists());
+  }
+  
+  public void testAdditionOfResourceToInJar() throws Exception {
+      runTest("incremental with addition of resource to inpath jar");
+      nextIncrement(true);
+      assertFalse("Resource file should not exist yet",new File(ajc.getSandboxDirectory(),"AResourceFile.txt").exists());
+      copyFileAndDoIncrementalBuild("changes/MyJar.20.jar", "MyJar.jar");
+      // resources *are* copied from inpath jars
+      assertAdded("AResourceFile.txt");      
+  }
+
+  public void testRemovalOfResourceFromInJar() throws Exception {
+      runTest("incremental with removal of resource from inpath jar");
+      nextIncrement(true);
+      assertAdded("AResourceFile.txt");
+      copyFileAndDoIncrementalBuild("changes/MyJar.20.jar", "MyJar.jar");
+      // resources *are* copied from inpath jars
+      assertDeleted("AResourceFile.txt");      
+  }
+  
+  public void testAdditionOfClassToInPathJar() throws Exception {
+      runTest("incremental with addition of class to inpath jar");
+      nextIncrement(true);
+      assertFalse("Hello2.class should not exist yet",new File(ajc.getSandboxDirectory(),"Hello2.class").exists());
+      copyFileAndDoIncrementalBuild("changes/MyJar.20.jar", "MyJar.jar");
+      assertAdded("Hello2.class");      
+  }
 
+  public void testRemovalOfClassFromInPathJar() throws Exception {
+      runTest("incremental with removal of class from inpath jar");
+      nextIncrement(true);
+      assertAdded("Hello2.class");
+      copyFileAndDoIncrementalBuild("changes/MyJar.20.jar", "MyJar.jar");
+      assertDeleted("Hello2.class");      
+  }
+  
+  public void testAdditionOfClassToInJarJar() throws Exception {
+      runTest("incremental with addition of class to injar jar");
+      nextIncrement(true);
+      assertFalse("Hello2.class should not exist yet",new File(ajc.getSandboxDirectory(),"Hello2.class").exists());
+      copyFileAndDoIncrementalBuild("changes/MyJar.20.jar", "MyJar.jar");
+      assertAdded("Hello2.class");      
+  }
+
+  public void testRemovalOfClassFromInJarJar() throws Exception {
+      runTest("incremental with removal of class from injar jar");
+      nextIncrement(true);
+      assertAdded("Hello2.class");
+      copyFileAndDoIncrementalBuild("changes/MyJar.20.jar", "MyJar.jar");
+      assertDeleted("Hello2.class");      
+  }
+  
+  public void testAdditionOfClassToInPathDir() throws Exception {
+      runTest("incremental with addition of class to inpath dir");
+      nextIncrement(true);
+      assertFalse("Hello2.class should not exist yet",new File(ajc.getSandboxDirectory(),"Hello2.class").exists());
+      copyFileAndDoIncrementalBuild("changes/Hello2.20.class", "indir/Hello2.class");
+      assertAdded("Hello2.class");      
+  }
+
+  public void testRemovalOfClassFromInPathDir() throws Exception {
+      runTest("incremental with removal of class from inpath dir");
+      nextIncrement(true);
+      assertAdded("Hello2.class");
+      deleteFileAndDoIncrementalBuild("indir/Hello2.class");
+      assertDeleted("Hello2.class");      
+  }
+   
+  public void testUpdateOfClassInInPathDir() throws Exception {
+      runTest("incremental with update of class in inpath dir");
+      nextIncrement(true);
+      RunResult before = run("Hello");
+      assertTrue("Should say hello",before.getStdOut().startsWith("hello"));
+      copyFileAndDoIncrementalBuild("changes/Hello.20.class", "indir/Hello.class");
+      RunResult after = run("Hello");
+      assertTrue("Should say updated hello",after.getStdOut().startsWith("updated hello"));
+  }
+  
   private long nextIncrement(boolean doWait) {
        long time = System.currentTimeMillis();
        if (doWait) {
index f2f72c9f05aa284a1471ee8a5d954598abed6a03..d24c5428bb4273ba32ff8f0b4bbf3719dce879b4 100644 (file)
         -->
     </ajc-test>
        
+        <ajc-test dir="incrementalju/resourceTests/resourceAdded"
+       pr="54622"
+               title="incremental with addition of resource to inpath directory">
+        <compile 
+                       staging="true" 
+                       sourceroots="src"
+                       options="-incremental"
+                       inpath="indir">
+               </compile>
+        <!--
+        <inc-compile tag="20">
+        </inc-compile>
+        <run class="Main"/>
+        -->
+    </ajc-test>
+
+
+        <ajc-test dir="incrementalju/resourceTests/resourceAdded"
+       pr="54622"
+               title="incremental with addition of resource to inpath jar">
+        <compile 
+                       staging="true" 
+                       sourceroots="src"
+                       options="-incremental"
+                       inpath="MyJar.jar">
+               </compile>
+        <!--
+        <inc-compile tag="20">
+            <dir-changes added="AResourceFile.txt"/>
+        </inc-compile>
+        <run class="Main"/>
+        -->
+    </ajc-test>
+
+
+       <ajc-test dir="incrementalju/resourceTests/resourceRemoved"
+       pr="54622"
+               title="incremental with removal of resource from inpath jar">
+        <compile 
+                       staging="true" 
+                       sourceroots="src"
+                       options="-incremental"
+                       inpath="MyJar.jar">
+               </compile>
+        <!--
+        <inc-compile tag="20">
+            <dir-changes removed="AResourceFile.txt"/>
+        </inc-compile>
+        <run class="Main"/>
+        -->
+    </ajc-test>
+
+
+        <ajc-test dir="incrementalju/injarTests/classAdded"
+       pr="54621"
+               title="incremental with addition of class to inpath jar">
+        <compile 
+                       staging="true" 
+                       sourceroots="src"
+                       options="-incremental"
+                       inpath="MyJar.jar">
+               </compile>
+        <!--
+        <inc-compile tag="20">
+            <dir-changes added="Hello2"/>
+        </inc-compile>
+        <run class="Main"/>
+        -->
+    </ajc-test>
+
+
+       <ajc-test dir="incrementalju/injarTests/classRemoved"
+       pr="54621"
+               title="incremental with removal of class from inpath jar">
+        <compile 
+                       staging="true" 
+                       sourceroots="src"
+                       options="-incremental"
+                       inpath="MyJar.jar">
+               </compile>
+        <!--
+        <inc-compile tag="20">
+            <dir-changes removed="Hello2"/>
+        </inc-compile>
+        <run class="Main"/>
+        -->
+    </ajc-test>
+
+   <ajc-test dir="incrementalju/injarTests/classAdded"
+       pr="54621"
+               title="incremental with addition of class to injar jar">
+        <compile 
+                       staging="true" 
+                       sourceroots="src"
+                       options="-incremental,-injars,MyJar.jar">
+               </compile>
+        <!--
+        <inc-compile tag="20">
+            <dir-changes added="Hello2"/>
+        </inc-compile>
+        <run class="Main"/>
+        -->
+    </ajc-test>
+
+
+       <ajc-test dir="incrementalju/injarTests/classRemoved"
+       pr="54621"
+               title="incremental with removal of class from injar jar">
+        <compile 
+                       staging="true" 
+                       sourceroots="src"
+                       options="-incremental,-injars,MyJar.jar"
+                       inpath="MyJar.jar">
+               </compile>
+        <!--
+        <inc-compile tag="20">
+            <dir-changes removed="Hello2"/>
+        </inc-compile>
+        <run class="Main"/>
+        -->
+    </ajc-test>
+
+
+
+        <ajc-test dir="incrementalju/inpathDirTests/classAdded"
+       pr="54621"
+               title="incremental with addition of class to inpath dir">
+        <compile 
+                       staging="true" 
+                       sourceroots="src"
+                       options="-incremental"
+                       inpath="indir">
+               </compile>
+        <!--
+        <inc-compile tag="20">
+            <dir-changes added="Hello2"/>
+        </inc-compile>
+        <run class="Main"/>
+        -->
+    </ajc-test>
+
+
+       <ajc-test dir="incrementalju/inpathDirTests/classRemoved"
+       pr="54621"
+               title="incremental with removal of class from inpath dir">
+        <compile 
+                       staging="true" 
+                       sourceroots="src"
+                       options="-incremental"
+                       inpath="indir">
+               </compile>
+        <!--
+        <inc-compile tag="20">
+            <dir-changes removed="Hello2"/>
+        </inc-compile>
+        <run class="Main"/>
+        -->
+    </ajc-test>
+
+        <ajc-test dir="incrementalju/inpathDirTests/classUpdated"
+       pr="54621"
+               title="incremental with update of class in inpath dir">
+        <compile 
+                       staging="true" 
+                       sourceroots="src"
+                       options="-incremental"
+                       inpath="indir">
+               </compile>
+        <!--
+        <inc-compile tag="20">
+        </inc-compile>
+        <run class="Main"/>
+        -->
+    </ajc-test>
\ No newline at end of file