1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Fixed broken Quick Fix tests.

This commit is contained in:
Sergey Prigogin 2011-11-07 14:28:57 -08:00
parent 45b6405be3
commit 666828f68a
2 changed files with 16 additions and 5 deletions

View file

@ -1,3 +1,13 @@
/*******************************************************************************
* Copyright (c) 2010, 2011 Tomasz Wesolowski 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:
* Tomasz Wesolowski - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.codan.internal.checkers.ui.quickfix; package org.eclipse.cdt.codan.internal.checkers.ui.quickfix;
import org.eclipse.cdt.codan.ui.AbstractCodanCMarkerResolution; import org.eclipse.cdt.codan.ui.AbstractCodanCMarkerResolution;
@ -36,6 +46,7 @@ public class CaseBreakQuickFixTest extends QuickFixTestCase {
String result = runQuickFixOneFile(); String result = runQuickFixOneFile();
assertContainedIn("break; }", result); assertContainedIn("break; }", result);
} }
// void func() { // void func() {
// int a; // int a;
// switch(a) { // switch(a) {
@ -47,6 +58,6 @@ public class CaseBreakQuickFixTest extends QuickFixTestCase {
public void testLastCaseComp() { public void testLastCaseComp() {
loadcode(getAboveComment()); loadcode(getAboveComment());
String result = runQuickFixOneFile(); String result = runQuickFixOneFile();
assertContainedIn("hello(); break;", result); assertContainedIn("hello();\n\nbreak;", result);
} }
} }

View file

@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Tomasz Wesolowski - initial API and implementation * Tomasz Wesolowski - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.codan.internal.checkers.ui.quickfix; package org.eclipse.cdt.codan.internal.checkers.ui.quickfix;
@ -64,7 +64,7 @@ public class CreateLocalVariableQuickFixTest extends QuickFixTestCase {
public void testString() { public void testString() {
loadcode(getAboveComment()); loadcode(getAboveComment());
String result = runQuickFixOneFile(); String result = runQuickFixOneFile();
assertContainedIn("const char *aString;", result); //$NON-NLS-1$ assertContainedIn("const char* aString;", result); //$NON-NLS-1$
} }
// void func() { // void func() {
@ -73,7 +73,7 @@ public class CreateLocalVariableQuickFixTest extends QuickFixTestCase {
public void testWString() { public void testWString() {
loadcode(getAboveComment()); loadcode(getAboveComment());
String result = runQuickFixOneFile(); String result = runQuickFixOneFile();
assertContainedIn("const wchar_t *aWString;", result); //$NON-NLS-1$ assertContainedIn("const wchar_t* aWString;", result); //$NON-NLS-1$
} }
// void func() { // void func() {