1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 14:55:41 +02:00

Fixed two broken tests.

This commit is contained in:
Sergey Prigogin 2012-02-11 16:50:42 -08:00
parent 57813d4bd5
commit 3991fd8658

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2010, 2011 Tomasz Wesolowski and others * Copyright (c) 2010, 2012 Tomasz Wesolowski and others
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -20,41 +20,42 @@ public class CaseBreakQuickFixTest extends QuickFixTestCase {
return new CaseBreakQuickFixBreak(); return new CaseBreakQuickFixBreak();
} }
// void func() { //void func() {
// int a; // int a;
// switch(a) { // switch(a) {
// case 1: // case 1:
// hello(); // hello();
// case 2: // case 2:
// } // break;
// } // }
//}
public void testMiddleCase() throws Exception { public void testMiddleCase() throws Exception {
loadcode(getAboveComment()); loadcode(getAboveComment());
String result = runQuickFixOneFile(); String result = runQuickFixOneFile();
assertContainedIn("break; case 2:", result); assertContainedIn("break;\tcase 2:", result);
} }
// void func() { //void func() {
// int a; // int a;
// switch(a) { // switch(a) {
// case 1: // case 1:
// hello(); // hello();
// } // }
// } //}
public void testLastCase() throws Exception { public void testLastCase() throws Exception {
loadcode(getAboveComment()); loadcode(getAboveComment());
String result = runQuickFixOneFile(); String result = runQuickFixOneFile();
assertContainedIn("break; }", result); assertContainedIn("break;\t}", result);
} }
// void func() { //void func() {
// int a; // int a;
// switch(a) { // switch(a) {
// case 1: { // case 1: {
// hello(); // hello();
// } // }
// } // }
// } //}
public void testLastCaseComp() throws Exception { public void testLastCaseComp() throws Exception {
loadcode(getAboveComment()); loadcode(getAboveComment());
String result = runQuickFixOneFile(); String result = runQuickFixOneFile();