View | Details | Raw Unified | Return to bug 110465 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/aspectj/org/eclipse/jdt/core/dom/AjASTConverter.java (+8 lines)
Lines 525-530 Link Here
525
		} else {
525
		} else {
526
			pointcutDecl.setDesignator(new org.aspectj.org.eclipse.jdt.core.dom.DefaultPointcut(this.ast,pointcutDeclaration.toString()));
526
			pointcutDecl.setDesignator(new org.aspectj.org.eclipse.jdt.core.dom.DefaultPointcut(this.ast,pointcutDeclaration.toString()));
527
		}
527
		}
528
		org.aspectj.org.eclipse.jdt.internal.compiler.ast.Argument[] parameters = pointcutDeclaration.arguments;
529
		if (parameters != null) {
530
			int parametersLength = parameters.length;
531
			for (int i = 0; i < parametersLength; i++) {
532
				pointcutDecl.parameters().add(convert(parameters[i]));
533
			}
534
		}
535
		
528
//		 The javadoc comment is now got from list store in compilation unit declaration
536
//		 The javadoc comment is now got from list store in compilation unit declaration
529
		if (this.resolveBindings) {
537
		if (this.resolveBindings) {
530
			recordNodes(pointcutDecl, pointcutDeclaration);
538
			recordNodes(pointcutDecl, pointcutDeclaration);
(-)src/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java (-1 / +9 lines)
Lines 514-520 Link Here
514
		printIndent();
514
		printIndent();
515
		buffer.append(" pointcut ");
515
		buffer.append(" pointcut ");
516
		node.getName().accept(this);
516
		node.getName().accept(this);
517
		buffer.append("():");
517
		buffer.append("(");
518
		List parameters = node.parameters();
519
		for (Iterator iter = parameters.iterator(); iter.hasNext();) {
520
			SingleVariableDeclaration element = (SingleVariableDeclaration) iter.next();
521
			buffer.append(element.getType().toString()+" "+element.getName());
522
			if (iter.hasNext())
523
				buffer.append(", ");
524
		}
525
		buffer.append("):");
518
		buffer.append(((DefaultPointcut)node.getDesignator()).getDetail());
526
		buffer.append(((DefaultPointcut)node.getDesignator()).getDetail());
519
		buffer.append(";\n");
527
		buffer.append(";\n");
520
		return false;
528
		return false;
(-)src/org/aspectj/org/eclipse/jdt/core/dom/PointcutDeclaration.java (-4 / +37 lines)
Lines 19-24 Link Here
19
 * has:
19
 * has:
20
 *   a name
20
 *   a name
21
 *   an optional pointcut designator called 'designator'
21
 *   an optional pointcut designator called 'designator'
22
 *   a SingleVariableDeclaration list called 'parameters'
22
 *   javadoc
23
 *   javadoc
23
 *   modifiers
24
 *   modifiers
24
 *   
25
 *   
Lines 36-41 Link Here
36
	private PointcutDesignator pointcutDesignator = null;
37
	private PointcutDesignator pointcutDesignator = null;
37
	public static final ChildPropertyDescriptor DESIGNATOR_PROPERTY = 
38
	public static final ChildPropertyDescriptor DESIGNATOR_PROPERTY = 
38
		new ChildPropertyDescriptor(PointcutDeclaration.class, "designator", PointcutDesignator.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
39
		new ChildPropertyDescriptor(PointcutDeclaration.class, "designator", PointcutDesignator.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
40
41
	/**
42
	 * The "parameters" structural property of this node type.
43
	 */
44
	public static final ChildListPropertyDescriptor PARAMETERS_PROPERTY = 
45
		new ChildListPropertyDescriptor(PointcutDeclaration.class, "parameters", SingleVariableDeclaration.class, CYCLE_RISK); //$NON-NLS-1$
39
	
46
	
40
	public PointcutDesignator getDesignator() {
47
	public PointcutDesignator getDesignator() {
41
		return this.pointcutDesignator;
48
		return this.pointcutDesignator;
Lines 110-129 Link Here
110
	private static final List PROPERTY_DESCRIPTORS_3_0;
117
	private static final List PROPERTY_DESCRIPTORS_3_0;
111
	
118
	
112
	static {
119
	static {
113
		List propertyList = new ArrayList(5);
120
		List propertyList = new ArrayList(6);
114
		createPropertyList(PointcutDeclaration.class, propertyList);
121
		createPropertyList(PointcutDeclaration.class, propertyList);
115
		addProperty(JAVADOC_PROPERTY, propertyList);
122
		addProperty(JAVADOC_PROPERTY, propertyList);
116
		addProperty(MODIFIERS_PROPERTY, propertyList);
123
		addProperty(MODIFIERS_PROPERTY, propertyList);
117
		addProperty(NAME_PROPERTY, propertyList);
124
		addProperty(NAME_PROPERTY, propertyList);
118
		addProperty(DESIGNATOR_PROPERTY, propertyList);
125
		addProperty(DESIGNATOR_PROPERTY, propertyList);
126
		addProperty(PARAMETERS_PROPERTY, propertyList);
127
		
119
		PROPERTY_DESCRIPTORS_2_0 = reapPropertyList(propertyList);
128
		PROPERTY_DESCRIPTORS_2_0 = reapPropertyList(propertyList);
120
		
129
		
121
		propertyList = new ArrayList(5);
130
		propertyList = new ArrayList(6);
122
		createPropertyList(PointcutDeclaration.class, propertyList);
131
		createPropertyList(PointcutDeclaration.class, propertyList);
123
		addProperty(JAVADOC_PROPERTY, propertyList);
132
		addProperty(JAVADOC_PROPERTY, propertyList);
124
		addProperty(MODIFIERS2_PROPERTY, propertyList);
133
		addProperty(MODIFIERS2_PROPERTY, propertyList);
125
		addProperty(NAME_PROPERTY, propertyList);
134
		addProperty(NAME_PROPERTY, propertyList);
126
		addProperty(DESIGNATOR_PROPERTY, propertyList);
135
		addProperty(DESIGNATOR_PROPERTY, propertyList);
136
		addProperty(PARAMETERS_PROPERTY, propertyList);
137
		
127
		PROPERTY_DESCRIPTORS_3_0 = reapPropertyList(propertyList);
138
		PROPERTY_DESCRIPTORS_3_0 = reapPropertyList(propertyList);
128
	}
139
	}
129
140
Lines 161-166 Link Here
161
		super(ast);
172
		super(ast);
162
	}
173
	}
163
	
174
	
175
	protected ASTNode.NodeList parameters =
176
		new ASTNode.NodeList(PARAMETERS_PROPERTY);
164
177
165
	/* (omit javadoc for this method)
178
	/* (omit javadoc for this method)
166
	 * Method declared on ASTNode.
179
	 * Method declared on ASTNode.
Lines 225-230 Link Here
225
		if (property == MODIFIERS2_PROPERTY) {
238
		if (property == MODIFIERS2_PROPERTY) {
226
			return modifiers();
239
			return modifiers();
227
		}
240
		}
241
		if (property == PARAMETERS_PROPERTY) {
242
			return parameters();
243
		}
228
		// allow default implementation to flag the error
244
		// allow default implementation to flag the error
229
		return super.internalGetChildListProperty(property);
245
		return super.internalGetChildListProperty(property);
230
	}
246
	}
Lines 272-278 Link Here
272
			result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers()));
288
			result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers()));
273
		}
289
		}
274
		result.setName((SimpleName) getName().clone(target));
290
		result.setName((SimpleName) getName().clone(target));
275
		result.setDesignator((PointcutDesignator) getDesignator().clone(target));
291
		if (getDesignator() != null) {
292
			result.setDesignator((PointcutDesignator) getDesignator().clone(target));
293
		}
294
		result.parameters().addAll(
295
				ASTNode.copySubtrees(target, parameters()));
276
		return result;
296
		return result;
277
	}
297
	}
278
	
298
	
Lines 299-314 Link Here
299
				}
319
				}
300
				acceptChild(ajvis, getName());
320
				acceptChild(ajvis, getName());
301
				acceptChild(ajvis, getDesignator());
321
				acceptChild(ajvis, getDesignator());
322
				acceptChildren(visitor, this.parameters);
302
			}
323
			}
303
			ajvis.endVisit(this);
324
			ajvis.endVisit(this);
304
		}
325
		}
305
	}
326
	}
306
		
327
		
328
	/**
329
	 * Returns the live ordered list of method parameter declarations for this
330
	 * method declaration.
331
	 * 
332
	 * @return the live list of method parameter declarations
333
	 *    (element type: <code>SingleVariableDeclaration</code>)
334
	 */ 
335
	public List parameters() {
336
		return this.parameters;
337
	}
338
	
307
	/* (omit javadoc for this method)
339
	/* (omit javadoc for this method)
308
	 * Method declared on ASTNode.
340
	 * Method declared on ASTNode.
309
	 */
341
	 */
310
	int memSize() {
342
	int memSize() {
311
		return super.memSize() + 2 * 4;
343
		return super.memSize() + 3 * 4;
312
	}
344
	}
313
	
345
	
314
	/* (omit javadoc for this method)
346
	/* (omit javadoc for this method)
Lines 320-325 Link Here
320
			+ (this.optionalDocComment == null ? 0 : getJavadoc().treeSize())
352
			+ (this.optionalDocComment == null ? 0 : getJavadoc().treeSize())
321
			+ (this.pointcutName == null ? 0 : getName().treeSize())
353
			+ (this.pointcutName == null ? 0 : getName().treeSize())
322
			+ (this.modifiers == null ? 0 : this.modifiers.listSize())
354
			+ (this.modifiers == null ? 0 : this.modifiers.listSize())
355
			+ this.parameters.listSize()
323
			+ (this.pointcutDesignator == null ? 0 : getDesignator().treeSize());
356
			+ (this.pointcutDesignator == null ? 0 : getDesignator().treeSize());
324
	}
357
	}
325
}
358
}
(-)testsrc/org/aspectj/tools/ajc/ASTVisitorTest.java (+32 lines)
Lines 180-185 Link Here
180
				"(compilationUnit(aspect(simpleName)(pointcut(simpleName))))");
180
				"(compilationUnit(aspect(simpleName)(pointcut(simpleName))))");
181
	}
181
	}
182
	
182
	
183
	public void testPointcutWithoutArguments(){
184
		check("aspect A {pointcut a(): adviceexecution();}",
185
				"(compilationUnit(aspect(simpleName)(pointcut(simpleName))))");
186
	}
187
		
188
	public void testPointcutWithOnePrimitiveArgument(){
189
		check("aspect A {pointcut a(int a): adviceexecution();}",
190
		"(compilationUnit(aspect(simpleName)(pointcut(simpleName)(primitiveType)(simpleName))))");
191
	}
192
193
	public void testPointcutWithTwoPrimitiveArguments(){
194
		check("aspect A {pointcut a(int a, double b): adviceexecution();}",
195
		"(compilationUnit(aspect(simpleName)(pointcut" +
196
		"(simpleName)(primitiveType)(simpleName)(primitiveType)" +
197
		"(simpleName))))");
198
	}
199
200
	public void testPointcutWithOneTypedArgument(){
201
		check("aspect A {pointcut a(A a): adviceexecution();}",
202
		"(compilationUnit(aspect(simpleName)(pointcut" +
203
		"(simpleName)(simpleName)" +
204
		"(simpleName))))");
205
	}
206
207
	public void testPointcutWithTwoTypedArgument(){
208
		check("aspect A {pointcut a(A a, B b): adviceexecution();}",
209
		"(compilationUnit(aspect(simpleName)(pointcut" +
210
		"(simpleName)(simpleName)" +
211
		"(simpleName)(simpleName)" +
212
		"(simpleName))))");
213
	}
214
183
	public void testFieldITD(){
215
	public void testFieldITD(){
184
		check("class A {}aspect B {int A.a;}",
216
		check("class A {}aspect B {int A.a;}",
185
				"(compilationUnit(class(simpleName))(aspect(simpleName)(fieldITD(primitiveType)(simpleName))))");
217
				"(compilationUnit(class(simpleName))(aspect(simpleName)(fieldITD(primitiveType)(simpleName))))");
(-)testsrc/org/aspectj/tools/ajc/AjASTTest.java (+126 lines)
Lines 45-50 Link Here
45
import org.aspectj.org.eclipse.jdt.core.dom.DeclareWarningDeclaration;
45
import org.aspectj.org.eclipse.jdt.core.dom.DeclareWarningDeclaration;
46
import org.aspectj.org.eclipse.jdt.core.dom.DefaultPointcut;
46
import org.aspectj.org.eclipse.jdt.core.dom.DefaultPointcut;
47
import org.aspectj.org.eclipse.jdt.core.dom.DefaultTypePattern;
47
import org.aspectj.org.eclipse.jdt.core.dom.DefaultTypePattern;
48
import org.aspectj.org.eclipse.jdt.core.dom.IExtendedModifier;
48
import org.aspectj.org.eclipse.jdt.core.dom.InterTypeFieldDeclaration;
49
import org.aspectj.org.eclipse.jdt.core.dom.InterTypeFieldDeclaration;
49
import org.aspectj.org.eclipse.jdt.core.dom.InterTypeMethodDeclaration;
50
import org.aspectj.org.eclipse.jdt.core.dom.InterTypeMethodDeclaration;
50
import org.aspectj.org.eclipse.jdt.core.dom.NotPointcut;
51
import org.aspectj.org.eclipse.jdt.core.dom.NotPointcut;
Lines 393-398 Link Here
393
				"the ReferencePointcut",rp,pd.getDesignator());
394
				"the ReferencePointcut",rp,pd.getDesignator());
394
	}
395
	}
395
	
396
	
397
	public void testGetAndSetPointcutArguments(){
398
		AjAST ajast = createAjAST();
399
		PointcutDeclaration pd = ajast.newPointcutDeclaration();
400
		assertEquals("by default the number of arguments is zero",pd.parameters().size(), 0);
401
		List l = pd.parameters();
402
		assertEquals("there shouldn't be any arguments associated with" +
403
				"the pointcut yet",0,l.size());
404
		SingleVariableDeclaration p1 = ajast.newSingleVariableDeclaration();
405
		l.add(p1);
406
		assertEquals("there should be one parameter associated with" +
407
				"the pointcut",1,pd.parameters().size());
408
		assertEquals("there should be a SingleVariableDeclaration associated with" +
409
				"the pointcut",p1,pd.parameters().get(0));
410
	}
411
412
	public void testPropertyDescriptorsForPointcutDeclaration() {
413
		AjAST ajast = createAjAST();
414
		PointcutDeclaration d = ajast.newPointcutDeclaration();
415
		List props = PointcutDeclaration.propertyDescriptors(AST.JLS3);
416
		boolean foundJavadoc = false;
417
		boolean foundModifiers = false;
418
		boolean foundName = false;
419
		boolean foundParamList = false;
420
		boolean foundDesignator = false;
421
		for (Iterator iter = props.iterator(); iter.hasNext();) {
422
			Object o = iter.next();
423
			if ((o instanceof ChildPropertyDescriptor)) {
424
				ChildPropertyDescriptor element = (ChildPropertyDescriptor)o;
425
				String id = element.getId();
426
				if (id.equals("javadoc")) {
427
					foundJavadoc = true;
428
				} else if (id.equals("designator")) {
429
					foundDesignator = true;
430
				} else if (id.equals("name")) {
431
					foundName = true;
432
				} else {
433
					fail("unknown PropertyDescriptor associated with PointcutDeclaration: " + element.getId());
434
				}
435
			} else if (o instanceof ChildListPropertyDescriptor) {
436
				ChildListPropertyDescriptor element = (ChildListPropertyDescriptor)o;
437
				if (element.getId().equals("parameters")) {
438
					foundParamList= true;					
439
				} else if (element.getId().equals("modifiers")) {
440
					foundModifiers = true;
441
				}
442
			} else {
443
				fail("unknown PropertyDescriptor associated with PointcutDeclaration: " + o);
444
			}
445
		}
446
		assertTrue("PointcutDeclaration should have a javadoc PropertyDescriptor",foundJavadoc);
447
		assertTrue("PointcutDeclaration should have a designator PropertyDescriptor",foundDesignator);
448
		assertTrue("PointcutDeclaration should have an name PropertyDescriptor",foundName);
449
		assertTrue("PointcutDeclaration should have a parameters PropertyDescriptor",foundParamList);
450
		assertTrue("PointcutDeclaration should have a modifiers PropertyDescriptor",foundModifiers);
451
	}
452
	
453
	public void testClonePointcutDeclaration() {
454
		AjAST ajast = createAjAST();
455
		PointcutDeclaration d = ajast.newPointcutDeclaration();
456
		d.setName(ajast.newSimpleName("pointcut_name"));
457
		d.parameters().add(ajast.newSingleVariableDeclaration());
458
		PointcutDeclaration copy = (PointcutDeclaration)ASTNode.copySubtree(ajast,d);
459
		assertEquals("there should be one parameter associated with" +
460
				"the pointcut copy",1,copy.parameters().size());
461
		assertEquals("the PointcutDeclaration clone should have the name ", "pointcut_name",
462
				copy.getName().toString());
463
	}
464
	
465
	public void testInternalPointcutDeclaration() {
466
		AjAST ajast = createAjAST();
467
		PointcutDeclaration d = ajast.newPointcutDeclaration();
468
		List props = PointcutDeclaration.propertyDescriptors(AST.JLS3);
469
		for (Iterator iter = props.iterator(); iter.hasNext();) {
470
			Object o = iter.next();
471
			if (o instanceof ChildPropertyDescriptor) {
472
				ChildPropertyDescriptor element = (ChildPropertyDescriptor)o;
473
				if (element.getId().equals("name")) {
474
					assertNotNull("PointcutDeclaration's " + element.getId() + " property" +
475
							" should not be null since it is lazily created",
476
							d.getStructuralProperty(element));				
477
				} else {
478
					assertNull("PointcutDeclaration's " + element.getId() + " property" +
479
							" should be null since we haven't set it yet",
480
							d.getStructuralProperty(element));				
481
				}				
482
			} else if (o instanceof ChildListPropertyDescriptor) {
483
				ChildListPropertyDescriptor element = (ChildListPropertyDescriptor)o;
484
				assertNotNull("PointcutDeclaration's " + element.getId() + " property" +
485
						"should not be null since it is a list",
486
						d.getStructuralProperty(element));
487
				boolean isIExtendedModifier = element.getElementType().equals(IExtendedModifier.class);
488
				boolean isSingleVariable = element.getElementType().equals(SingleVariableDeclaration.class);
489
				assertTrue("should only be able to put SingleVariableDeclaration's" +
490
						" (which itself has node type IExtendedModifier) into the list",
491
						isIExtendedModifier || isSingleVariable);
492
			} else if (o instanceof SimplePropertyDescriptor) {
493
				SimplePropertyDescriptor element = (SimplePropertyDescriptor)o;
494
				assertNotNull("PointcutDeclaration's " + element.getId() + " property" +
495
						"should not be null since it is a boolean",
496
						d.getStructuralProperty(element));									
497
			} else {
498
				fail("unknown PropertyDescriptor associated with PointcutDeclaration: " + o);
499
			}
500
		}
501
		for (Iterator iter = props.iterator(); iter.hasNext();) {
502
			Object o = iter.next();
503
			if (o instanceof ChildPropertyDescriptor) {
504
				ChildPropertyDescriptor element = (ChildPropertyDescriptor) o;
505
				if (element.getId().equals("designator")) {
506
					ReferencePointcut rp = ajast.newReferencePointcut();
507
					d.setStructuralProperty(element,rp);
508
					assertEquals("PointcutDeclaration's designator property should" +
509
							" now be a ReferencePointcut",rp,d.getStructuralProperty(element));
510
				} else if (element.getId().equals("javadoc")) {
511
					// do nothing since makes no sense to have javadoc
512
				} else if (element.getId().equals("name")) {
513
					SimpleName sn = ajast.newSimpleName("p");
514
					d.setStructuralProperty(element,sn);
515
					assertEquals("PointcutDeclaration's name property should" +
516
							" now be a SimpleName",sn,d.getStructuralProperty(element));
517
				}
518
			} 
519
		}
520
	}
521
	
396
	// -------------- AspectDeclaration tests ---------------
522
	// -------------- AspectDeclaration tests ---------------
397
523
398
	public void testNewAspectDeclaration() {
524
	public void testNewAspectDeclaration() {
(-)testsrc/org/aspectj/tools/ajc/AjcTests.java (+1 lines)
Lines 29-34 Link Here
29
        suite.addTestSuite(ASTVisitorTest.class);
29
        suite.addTestSuite(ASTVisitorTest.class);
30
        suite.addTestSuite(ASTitdTest.class);
30
        suite.addTestSuite(ASTitdTest.class);
31
        suite.addTestSuite(AjASTTest.class);
31
        suite.addTestSuite(AjASTTest.class);
32
        suite.addTestSuite(AjNaiveASTFlattenerTest.class);
32
        return suite;
33
        return suite;
33
    }
34
    }
34
35
(-)testsrc/org/aspectj/tools/ajc/AjNaiveASTFlattenerTest.java (+78 lines)
Added Link Here
1
/********************************************************************
2
 * Copyright (c) 2006 Contributors. All rights reserved. 
3
 * This program and the accompanying materials are made available 
4
 * under the terms of the Eclipse Public License v1.0 
5
 * which accompanies this distribution and is available at 
6
 * http://eclipse.org/legal/epl-v10.html 
7
 *  
8
 * Contributors: IBM Corporation - initial API and implementation 
9
 * 				 Eduardo Piveta  - initial version
10
 *               Helen Hawkins   - ammended to fit within JUnit framework
11
 *******************************************************************/
12
package org.aspectj.tools.ajc;
13
14
import java.util.HashMap;
15
16
import junit.framework.TestCase;
17
18
import org.aspectj.org.eclipse.jdt.core.dom.AST;
19
import org.aspectj.org.eclipse.jdt.core.dom.ASTParser;
20
import org.aspectj.org.eclipse.jdt.core.dom.AjNaiveASTFlattener;
21
import org.aspectj.org.eclipse.jdt.core.dom.CompilationUnit;
22
23
public class AjNaiveASTFlattenerTest extends TestCase {
24
25
	public void testNoPointcutArgs() {
26
		check("public aspect A { pointcut y(): call(* *.*(..));}",
27
				"public aspect A {\n   pointcut y():call(* *.*(..));\n}\n");
28
	}
29
30
	public void testOneIntPointcutArg() {
31
		check("public aspect A { pointcut y(int a): call(* *.*(..));}",
32
				"public aspect A {\n   pointcut y(int a):call(* *.*(..));\n}\n");		
33
	}
34
	
35
	public void testOneIntOneDoublePointcutArg() {
36
		check("public aspect A { pointcut y(int a, double b): call(* *.*(..));}",
37
				"public aspect A {\n   pointcut y(int a, double b):call(* *.*(..));\n}\n");		
38
	}
39
	
40
	public void testOneTypedPointcutArg() {
41
		check("public aspect A { pointcut y(X a): call(* *.*(..));}",
42
				"public aspect A {\n   pointcut y(X a):call(* *.*(..));\n}\n");		
43
	}
44
	
45
	public void testTwoTypedPointcutArgs() {
46
		check("public aspect A { pointcut y(X a, X b): call(* *.*(..));}",
47
				"public aspect A {\n   pointcut y(X a, X b):call(* *.*(..));\n}\n");		
48
	}
49
	
50
	public void testOneTypedAndOneIntPointcutArg() {
51
		check("public aspect A { pointcut y(X a, int b): call(* *.*(..));}",
52
				"public aspect A {\n   pointcut y(X a, int b):call(* *.*(..));\n}\n");		
53
	}
54
	
55
	public void testOneIntAndOneTypedPointcutArg() {
56
		check("public aspect A { pointcut y(int a, X b): call(* *.*(..));}",
57
				"public aspect A {\n   pointcut y(int a, X b):call(* *.*(..));\n}\n");		
58
	}
59
	
60
	public void testOneIntOneDoubleAndOneTypedPointcutArg() {
61
		check("public aspect A { pointcut y(int a, double b, Y c): call(* *.*(..));}",
62
				"public aspect A {\n   pointcut y(int a, double b, Y c):call(* *.*(..));\n}\n");
63
	}
64
65
	private void check(String source, String expectedOutput) {
66
		ASTParser parser = ASTParser.newParser(AST.JLS2);
67
		parser.setCompilerOptions(new HashMap());
68
		parser.setSource(source.toCharArray());
69
		CompilationUnit cu2 = (CompilationUnit) parser.createAST(null);
70
		AjNaiveASTFlattener visitor = new AjNaiveASTFlattener();
71
		cu2.accept(visitor);
72
		String result = visitor.getResult();
73
		System.err.println(result);
74
		assertTrue("Expected:\n"+ expectedOutput + "====Actual:\n" + result,
75
				expectedOutput.equals(result));
76
	}
77
78
}

Return to bug 110465