Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 124622 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java (-1 / +26 lines)
Lines 54-60 Link Here
54
	private long time;
54
	private long time;
55
	
55
	
56
	static {
56
	static {
57
//		TESTS_NUMBERS = new int[] { 650 };
57
//		TESTS_NUMBERS = new int[] { 141, 656, 657, 658 };
58
//		TESTS_RANGE = new int[] { 650, -1 };
58
//		TESTS_RANGE = new int[] { 650, -1 };
59
	}
59
	}
60
	public static Test suite() {
60
	public static Test suite() {
Lines 1417-1422 Link Here
1417
		preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
1417
		preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
1418
		preferences.indent_switchstatements_compare_to_cases = false;
1418
		preferences.indent_switchstatements_compare_to_cases = false;
1419
		preferences.indent_switchstatements_compare_to_switch = false;
1419
		preferences.indent_switchstatements_compare_to_switch = false;
1420
		preferences.indent_breaks_compare_to_cases = false;
1420
		DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
1421
		DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
1421
		runTest(codeFormatter, "test141", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
1422
		runTest(codeFormatter, "test141", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
1422
	}
1423
	}
Lines 9214-9217 Link Here
9214
		DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
9215
		DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
9215
		runTest(codeFormatter, "test655", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
9216
		runTest(codeFormatter, "test655", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
9216
	}
9217
	}
9218
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=124622
9219
	public void test656() {
9220
		final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
9221
		DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
9222
		DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
9223
		runTest(codeFormatter, "test656", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
9224
	}
9225
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=124622
9226
	public void test657() {
9227
		final Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
9228
		DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
9229
		DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
9230
		runTest(codeFormatter, "test657", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
9231
	}
9232
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=124622
9233
	public void test658() {
9234
		DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
9235
		preferences.tab_char = DefaultCodeFormatterOptions.SPACE;
9236
		preferences.indent_switchstatements_compare_to_cases = false;
9237
		preferences.indent_switchstatements_compare_to_switch = false;
9238
		preferences.indent_breaks_compare_to_cases = false;
9239
		DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
9240
		runTest(codeFormatter, "test658", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
9241
	}
9217
}
9242
}
(-)workspace/Formatter/test656/A_out.java (+14 lines)
Added Link Here
1
public class Test {
2
	public static void main(String[] args) {
3
		switch (0) {
4
5
		/** My Comment */
6
		case 0:
7
			break;
8
9
			/** My Comment */
10
		case 1:
11
			break;
12
		}
13
	}
14
}
(-)workspace/Formatter/test657/A_in.java (+14 lines)
Added Link Here
1
public class Test {
2
	public static void main(String[] args) {
3
		switch (0) {
4
5
			  /** My Comment */
6
			  case 0:
7
			    return;
8
9
			  /** My Comment */
10
			  case 1:
11
			    break;
12
			}
13
	}
14
}
(-)workspace/Formatter/test658/A_out.java (+10 lines)
Added Link Here
1
package test1;
2
public class A {
3
    public void foo(int i) {
4
        switch (x) {
5
        case 1 :
6
        break;
7
        default :
8
        }
9
    }
10
}
(-)workspace/Formatter/test658/A_in.java (+10 lines)
Added Link Here
1
package test1;
2
public class A {
3
    public void foo(int i) {
4
        switch (x) {
5
            case 1 :
6
                break;
7
            default :
8
        }
9
    }
10
}
(-)workspace/Formatter/test657/A_out.java (+14 lines)
Added Link Here
1
public class Test {
2
	public static void main(String[] args) {
3
		switch (0) {
4
5
		/** My Comment */
6
		case 0:
7
			return;
8
9
			/** My Comment */
10
		case 1:
11
			break;
12
		}
13
	}
14
}
(-)workspace/Formatter/test656/A_in.java (+14 lines)
Added Link Here
1
public class Test {
2
	public static void main(String[] args) {
3
		switch (0) {
4
5
			  /** My Comment */
6
			  case 0:
7
			    break;
8
9
			  /** My Comment */
10
			  case 1:
11
			    break;
12
			}
13
	}
14
}

Return to bug 124622