| Index: packages/dart_style/test/splitting/generic_method_parameters.unit
|
| diff --git a/packages/dart_style/test/splitting/generic_method_parameters.unit b/packages/dart_style/test/splitting/generic_method_parameters.unit
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bbe1f43dafef1fb9515cb443d4e965ebfb83b19e
|
| --- /dev/null
|
| +++ b/packages/dart_style/test/splitting/generic_method_parameters.unit
|
| @@ -0,0 +1,67 @@
|
| +40 columns |
|
| +>>> all fit on one line
|
| +foo<A,B,C,D>() {}
|
| +<<<
|
| +foo<A, B, C, D>() {}
|
| +>>> prefer to split between params even when they all fit on next line
|
| +longFunctionName<First, Second, Third>() {}
|
| +<<<
|
| +longFunctionName<First, Second,
|
| + Third>() {}
|
| +>>> split before first if needed
|
| +longFunctionName<FirstTypeParameterIsLong, S>() {}
|
| +<<<
|
| +longFunctionName<
|
| + FirstTypeParameterIsLong, S>() {}
|
| +>>> split in middle if fit in two lines
|
| +longFunctionName<First, Second, Third, Fourth, Fifth, Sixth>() {}
|
| +<<<
|
| +longFunctionName<First, Second, Third,
|
| + Fourth, Fifth, Sixth>() {}
|
| +>>> split one per line if they don't fit in two lines
|
| +veryLongFunctionName<First, Second, Third, Fourth, Fifth, Sixth, Seventh>() {}
|
| +<<<
|
| +veryLongFunctionName<
|
| + First,
|
| + Second,
|
| + Third,
|
| + Fourth,
|
| + Fifth,
|
| + Sixth,
|
| + Seventh>() {}
|
| +>>> split both type and value arguments
|
| +lengthyMethodName<First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth>(first, second, third, fourth, fifth, sixth, seventh, eighth) {}
|
| +<<<
|
| +lengthyMethodName<
|
| + First,
|
| + Second,
|
| + Third,
|
| + Fourth,
|
| + Fifth,
|
| + Sixth,
|
| + Seventh,
|
| + Eighth>(
|
| + first,
|
| + second,
|
| + third,
|
| + fourth,
|
| + fifth,
|
| + sixth,
|
| + seventh,
|
| + eighth) {}
|
| +>>> type parameters and => body
|
| +longFunctionName<LongTypeParameterT, LongTypeParameterS>() => body;
|
| +<<<
|
| +longFunctionName<
|
| + LongTypeParameterT,
|
| + LongTypeParameterS>() =>
|
| + body;
|
| +>>> type parameters, value parameters, and => body
|
| +longFunctionName<LongTypeParameterT, LongTypeParameterS>(longParameter1, longParameter2) => body;
|
| +<<<
|
| +longFunctionName<
|
| + LongTypeParameterT,
|
| + LongTypeParameterS>(
|
| + longParameter1,
|
| + longParameter2) =>
|
| + body;
|
|
|