38394041424344454647
*/ @Test(expected = NotEnoughBracketsException.class) public void testBrackets() throws FormatterException{ String badCode = "public class Class { void main(){}"; try { formatter.format(new StringInStream(badCode), new StringOutStream(), options); } catch (StreamException e){ // do nothing } }
61626364656667686970
"\n bum(i)" + "\n }" + "\n}"; StringOutStream res = new StringOutStream(); try { formatter.format(new StringInStream(code), res, options); } catch (FormatterException e){ }catch (StreamException e){} assertEquals(resCode, res.show()); }
84858687888990919293
"\n\t\tbum(i)" + "\n\t}" + "\n}"; StringOutStream res = new StringOutStream(); try { formatter.format(new StringInStream(code), res, options); } catch (FormatterException e){} catch(StreamException e){} assertEquals(resCode, res.show()); }