Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-11-07 17:28:57 -0500
committerSergey Prigogin2011-11-07 17:28:57 -0500
commit666828f68a037d4ad55d3ec0712c7b16e2a6594d (patch)
tree63b8754bed58a02184b24649459d091f0a6454df /codan/org.eclipse.cdt.codan.core.test
parent45b6405be347011c878008a7283ab4dc311eefca (diff)
downloadorg.eclipse.cdt-666828f68a037d4ad55d3ec0712c7b16e2a6594d.tar.gz
org.eclipse.cdt-666828f68a037d4ad55d3ec0712c7b16e2a6594d.tar.xz
org.eclipse.cdt-666828f68a037d4ad55d3ec0712c7b16e2a6594d.zip
Fixed broken Quick Fix tests.
Diffstat (limited to 'codan/org.eclipse.cdt.codan.core.test')
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixTest.java13
-rw-r--r--codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CreateLocalVariableQuickFixTest.java8
2 files changed, 16 insertions, 5 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixTest.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixTest.java
index 3c057af950..c85f489c7a 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixTest.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CaseBreakQuickFixTest.java
@@ -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);
}
}
diff --git a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CreateLocalVariableQuickFixTest.java b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CreateLocalVariableQuickFixTest.java
index fe530b17e5..2cdec1d9e6 100644
--- a/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CreateLocalVariableQuickFixTest.java
+++ b/codan/org.eclipse.cdt.codan.core.test/src/org/eclipse/cdt/codan/internal/checkers/ui/quickfix/CreateLocalVariableQuickFixTest.java
@@ -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() {

Back to the top