diff options
Diffstat (limited to 'core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArrayModifierTest.java')
-rw-r--r-- | core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArrayModifierTest.java | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArrayModifierTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArrayModifierTest.java index f973cbcf8db..43b63c6a60b 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArrayModifierTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/changegenerator/replace/ArrayModifierTest.java @@ -1,29 +1,29 @@ /******************************************************************************* - * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik + * Copyright (c) 2008 Institute for Software, HSR Hochschule fuer Technik * Rapperswil, University of applied sciences and others - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Institute for Software - initial API and implementation + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Institute for Software - initial API and implementation *******************************************************************************/ package org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.replace; import junit.framework.Test; +import org.eclipse.cdt.core.dom.ast.ASTVisitor; import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator; import org.eclipse.cdt.core.dom.ast.IASTArrayModifier; import org.eclipse.cdt.core.dom.ast.IASTDeclarator; import org.eclipse.cdt.core.dom.ast.IASTExpression; -import org.eclipse.cdt.core.dom.ast.ASTVisitor; import org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.ChangeGeneratorTest; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTArrayModifier; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression; import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification; -import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore; import org.eclipse.cdt.internal.core.dom.rewrite.ASTModification.ModificationKind; +import org.eclipse.cdt.internal.core.dom.rewrite.ASTModificationStore; public class ArrayModifierTest extends ChangeGeneratorTest { @@ -42,22 +42,20 @@ public class ArrayModifierTest extends ChangeGeneratorTest { return new ArrayModifierTest(); } - @Override - protected ASTVisitor createModificator( - final ASTModificationStore modStore) { + protected ASTVisitor createModificator(final ASTModificationStore modStore) { return new ASTVisitor() { { shouldVisitDeclarators = true; } - + @Override public int visit(IASTDeclarator declarator) { if (declarator instanceof IASTArrayDeclarator) { IASTArrayDeclarator arrayDeclarator = (IASTArrayDeclarator)declarator; IASTArrayModifier[] modifiers = arrayDeclarator.getArrayModifiers(); IASTArrayModifier newModifier = new CPPASTArrayModifier(); - IASTExpression expr = new CPPASTLiteralExpression(0, "15"); //$NON-NLS-1$ + IASTExpression expr = new CPPASTLiteralExpression(0, "15".toCharArray()); //$NON-NLS-1$ newModifier.setConstantExpression(expr); ASTModification modification = new ASTModification(ModificationKind.REPLACE, modifiers[0], newModifier, null); modStore.storeModification(null, modification); |