1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 17:26: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;
import org.eclipse.cdt.codan.ui.AbstractCodanCMarkerResolution;
@ -36,6 +46,7 @@ public class CaseBreakQuickFixTest extends QuickFixTestCase {
String result = runQuickFixOneFile();
assertContainedIn("break; }", result);
}
// void func() {
// int a;
// switch(a) {
@ -47,6 +58,6 @@ public class CaseBreakQuickFixTest extends QuickFixTestCase {
public void testLastCaseComp() {
loadcode(getAboveComment());
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
*
* Contributors:
* Tomasz Wesolowski - initial API and implementation
* Tomasz Wesolowski - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.codan.internal.checkers.ui.quickfix;
@ -30,7 +30,7 @@ public class CreateLocalVariableQuickFixTest extends QuickFixTestCase {
/*
* (non-Javadoc)
*
*
* @see org.eclipse.cdt.codan.core.test.CodanTestCase#setUp()
*/
@Override
@ -64,7 +64,7 @@ public class CreateLocalVariableQuickFixTest extends QuickFixTestCase {
public void testString() {
loadcode(getAboveComment());
String result = runQuickFixOneFile();
assertContainedIn("const char *aString;", result); //$NON-NLS-1$
assertContainedIn("const char* aString;", result); //$NON-NLS-1$
}
// void func() {
@ -73,7 +73,7 @@ public class CreateLocalVariableQuickFixTest extends QuickFixTestCase {
public void testWString() {
loadcode(getAboveComment());
String result = runQuickFixOneFile();
assertContainedIn("const wchar_t *aWString;", result); //$NON-NLS-1$
assertContainedIn("const wchar_t* aWString;", result); //$NON-NLS-1$
}
// void func() {