View | Details | Raw Unified | Return to bug 317039 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java (+44 lines)
Lines 7103-7108 Link Here
7103
}
7103
}
7104
7104
7105
/**
7105
/**
7106
 * @bug 317039: [formatter] Code Formatter fails on inner class source indentation
7107
 * @test Ensure formatter is stable when 'Never Join Lines' preference is checked
7108
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=317039"
7109
 */
7110
public void testBug317039_njl() {
7111
	this.formatterPrefs.join_wrapped_lines = false;
7112
	String source =
7113
		"public class X01\n" + 
7114
		"  {\n" + 
7115
		"\n" + 
7116
		"    public void innerThread()\n" + 
7117
		"      {\n" + 
7118
		"\n" + 
7119
		"        new Thread(new Runnable()\n" + 
7120
		"          {\n" + 
7121
		"            @Override\n" + 
7122
		"            public void run()\n" + 
7123
		"              {\n" + 
7124
		"                // TODO Auto-generated method stub\n" + 
7125
		"                }\n" + 
7126
		"            }).start();\n" + 
7127
		"        }\n" + 
7128
		"    }\n";
7129
	formatSource(source,
7130
		"public class X01\n" + 
7131
		"{\n" + 
7132
		"\n" + 
7133
		"	public void innerThread()\n" + 
7134
		"	{\n" + 
7135
		"\n" + 
7136
		"		new Thread(new Runnable()\n" + 
7137
		"		{\n" + 
7138
		"			@Override\n" + 
7139
		"			public void run()\n" + 
7140
		"			{\n" + 
7141
		"				// TODO Auto-generated method stub\n" + 
7142
		"			}\n" + 
7143
		"		}).start();\n" + 
7144
		"	}\n" + 
7145
		"}\n"
7146
	);
7147
}
7148
7149
/**
7106
 * @bug 320754: [formatter] formatter:off/on tags does not work correctly
7150
 * @bug 320754: [formatter] formatter:off/on tags does not work correctly
7107
 * @test Ensure disabling/enabling tags work properly around annotations
7151
 * @test Ensure disabling/enabling tags work properly around annotations
7108
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=320754"
7152
 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=320754"

Return to bug 317039