From 9edb4b6f9e8ca59b309ac382e6049321832d0700 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 12 Dec 2005 15:42:19 +0000 Subject: fixes for 120363 : from matthew (include/exclude problems for LTW) --- .../ataspectj/Test$$EnhancerByCGLIB$$12345.java | 19 ------------------- .../ataspectj/ataspectj/aop-dumpbeforeandafter.xml | 8 +++++--- .../com/foo/bar/Test$$EnhancerByCGLIB$$12345.java | 20 ++++++++++++++++++++ tests/java5/ataspectj/com/foo/bar/Test.java | 19 +++++++++++++++++++ .../systemtest/ajc150/ataspectj/AtAjLTWTests.java | 17 +++++++++++------ .../org/aspectj/systemtest/ajc150/ataspectj/ltw.xml | 14 +++++++++++--- 6 files changed, 66 insertions(+), 31 deletions(-) delete mode 100644 tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java create mode 100644 tests/java5/ataspectj/com/foo/bar/Test$$EnhancerByCGLIB$$12345.java create mode 100644 tests/java5/ataspectj/com/foo/bar/Test.java (limited to 'tests') diff --git a/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java b/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java deleted file mode 100644 index 78df5f1b1..000000000 --- a/tests/java5/ataspectj/ataspectj/Test$$EnhancerByCGLIB$$12345.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. - * 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: - * Matthew Webster - initial implementation - *******************************************************************************/ -package ataspectj; - -public class Test$$EnhancerByCGLIB$$12345 { - - public static void main(String[] args) { - System.out.println("Test$$EnhancerByCGLIB$$12345.main()"); - } - -} diff --git a/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml b/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml index 487d5dd62..43b749053 100644 --- a/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml +++ b/tests/java5/ataspectj/ataspectj/aop-dumpbeforeandafter.xml @@ -1,6 +1,8 @@ - - - + + + + + diff --git a/tests/java5/ataspectj/com/foo/bar/Test$$EnhancerByCGLIB$$12345.java b/tests/java5/ataspectj/com/foo/bar/Test$$EnhancerByCGLIB$$12345.java new file mode 100644 index 000000000..3640800b6 --- /dev/null +++ b/tests/java5/ataspectj/com/foo/bar/Test$$EnhancerByCGLIB$$12345.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2005 IBM Corporation and others. + * 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: + * Matthew Webster - initial implementation + *******************************************************************************/ +package com.foo.bar; + +public class Test$$EnhancerByCGLIB$$12345 { + + public static void main(String[] args) { + System.out.println("Test$$EnhancerByCGLIB$$12345.main()"); + Test.main(args); + } + +} diff --git a/tests/java5/ataspectj/com/foo/bar/Test.java b/tests/java5/ataspectj/com/foo/bar/Test.java new file mode 100644 index 000000000..a1629a7b4 --- /dev/null +++ b/tests/java5/ataspectj/com/foo/bar/Test.java @@ -0,0 +1,19 @@ +/******************************************************************************* + * Copyright (c) 2005 IBM Corporation and others. + * 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: + * Matthew Webster - initial implementation + *******************************************************************************/ +package com.foo.bar; + +public class Test { + + public static void main(String[] args) { + System.out.println("Test.main()"); + } + +} diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java index 7c2e52978..eb4ad7445 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/AtAjLTWTests.java @@ -97,11 +97,18 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase { public void testLTWDumpBeforeAndAfter() { runTest("LTW DumpTest before and after"); + + // before + File f = new File("_ajdump/_before/com/foo/bar"); + CountingFilenameFilter cff = new CountingFilenameFilter(); + f.listFiles(cff); + assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount()); - File f = new File("_ajdump/_before/ataspectj/Test$$EnhancerByCGLIB$$12345.class"); - assertTrue(f.exists()); - f = new File("_ajdump/ataspectj/Test$$EnhancerByCGLIB$$12345.class"); - assertTrue(f.exists()); + // after + f = new File("_ajdump/com/foo/bar"); + cff = new CountingFilenameFilter(); + f.listFiles(cff); + assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount()); // tidy up... f = new File("_ajdump"); @@ -127,12 +134,10 @@ public class AtAjLTWTests extends XMLBasedAjcTestCase { // The working directory is different because this test must be forked File dir = new File("../tests/java5/ataspectj"); File f = new File(dir,"_ajdump/_before"); - System.out.println("AtAjLTWTests.testLTWDumpProxy() f=" + f.getAbsolutePath()); CountingFilenameFilter cff = new CountingFilenameFilter(); f.listFiles(cff); assertEquals("Expected dump file in " + f.getAbsolutePath(),1,cff.getCount()); f = new File(dir,"_ajdump"); - System.out.println("AtAjLTWTests.testLTWDumpProxy() f=" + f.getAbsolutePath()); cff = new CountingFilenameFilter(); f.listFiles(cff); assertEquals(1,cff.getCount()); diff --git a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml index 6b7f35987..6cf87b52c 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml @@ -92,12 +92,20 @@ options="-1.5"/> - + - + + + + + + + + + -- cgit v1.2.3