Lines Matching defs:Style

22                             const FormatStyle &Style) {
28 reformat(Style, Code, Ranges, "<stdin>", &Status);
38 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) {
39 return format(Code, 0, Code.size(), Style);
43 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
44 Style.ColumnLimit = ColumnLimit;
45 return Style;
50 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) {
51 EXPECT_EQ(Code.str(), format(Code, Style)) << "Expected code is not stable";
52 std::string Result = format(test::messUp(Code), Style);
58 const FormatStyle &Style = getGoogleStyle(FormatStyle::LK_JavaScript)) {
59 EXPECT_EQ(Expected.str(), format(Expected, Style))
61 std::string Result = format(Code, Style);
263 FormatStyle Style = getGoogleJSStyleWithColumns(80);
264 Style.AlignOperands = FormatStyle::OAS_Align;
267 Style);
268 Style.BreakBeforeBinaryOperators = FormatStyle::BOS_All;
271 Style);
973 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
974 Style.InsertTrailingCommas = FormatStyle::TCS_Wrapped;
983 Style);
985 Style.ColumnLimit = 30;
989 "const x = [aaaaaaaaaaaaaaaaaaaaaaaaa];", Style);
994 "const x = [aaaaaaaaaaaaaaaaaaaaaaaaaaaa];", Style);
999 "const x = {a: aaaaaaaaaaaaaaaaa};", Style);
1003 "const x = {a: aaaaaaaaaaaaaaaaaaaaaaaaa};", Style);
1008 "let x: {a: aaaaaaaaaaaaaaaaaaaaa};", Style);
1012 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
1013 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
1015 verifyFormat("doFoo(function() { return 1; });", Style);
1030 Style);
1106 Style.ColumnLimit = 33;
1107 verifyFormat("f({a: function() { return 1; }});", Style);
1108 Style.ColumnLimit = 32;
1112 Style);
1125 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
1126 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Inline;
1130 Style);
1131 verifyFormat("var func = doSomething(function() { return 1; });", Style);
1135 Style);
1139 Style);
1141 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All;
1142 verifyFormat("var func = function() { return 1; };", Style);
1143 verifyFormat("var func = doSomething(function() { return 1; });", Style);
1146 Style);
1150 Style);
1152 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_None;
1156 Style);
1160 Style);
1166 Style);
1172 Style);
1174 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Empty;
1178 Style);
1182 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
1183 Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_All;
1221 Style);
1235 Style);
1289 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
1290 Style.AllowShortLambdasOnASingleLine = FormatStyle::SLS_All;
1291 verifyFormat("const arr = () => { x; };", Style);
1292 verifyFormat("const arrInlineAll = () => {};", Style);
1293 Style.AllowShortLambdasOnASingleLine = FormatStyle::SLS_None;
1297 Style);
1300 Style);
1301 Style.AllowShortLambdasOnASingleLine = FormatStyle::SLS_Empty;
1305 Style);
1306 verifyFormat("const arrInlineEmpty = () => {};", Style);
1307 Style.AllowShortLambdasOnASingleLine = FormatStyle::SLS_Inline;
1311 Style);
1312 verifyFormat("foo(() => {});", Style);
1313 verifyFormat("const arrInlineInline = () => {};", Style);
1777 const FormatStyle &Style = getGoogleJSStyleWithColumns(22);
1782 Style);
1874 const FormatStyle &Style = getGoogleJSStyleWithColumns(20);
1877 "type LongTypeIsReallyUnreasonablyLong = string;", Style);
1882 Style);
1993 FormatStyle Style = getGoogleJSStyleWithColumns(80);
1994 Style.JavaScriptWrapImports = true;
2000 Style);
2005 Style);
2010 Style);
2011 Style.ColumnLimit = 40;
2021 Style);
2754 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
2755 Style.AlignConsecutiveDeclarations.Enabled = true;
2758 Style);
2762 Style);
2766 Style);
2770 Style);
2774 Style);
2778 Style);
2782 Style);
2786 Style);
2790 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
2792 Style.AlignConsecutiveAssignments.Enabled = true;
2795 Style);
2799 Style);
2803 Style);
2807 Style);
2811 Style);
2815 Style);
2819 Style);
2823 Style);
2827 FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
2828 Style.AlignConsecutiveDeclarations.Enabled = true;
2829 Style.AlignConsecutiveAssignments.Enabled = true;
2832 Style);
2836 Style);
2840 Style);
2844 Style);
2848 Style);
2852 Style);
2856 Style);
2860 Style);
2870 auto Style = getGoogleStyle(FormatStyle::LK_JavaScript);
2871 EXPECT_EQ(Style.AlignAfterOpenBracket, FormatStyle::BAS_AlwaysBreak);
2874 Style);
2877 Style);
2880 Style);
2883 Style);
2888 Style);