| Index: packages/dart_style/test/regression/0500/0506.unit
|
| diff --git a/packages/dart_style/test/regression/0500/0506.unit b/packages/dart_style/test/regression/0500/0506.unit
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b152e2133f85c48cbd8cbe65f4fa01fcab7c08ce
|
| --- /dev/null
|
| +++ b/packages/dart_style/test/regression/0500/0506.unit
|
| @@ -0,0 +1,92 @@
|
| +>>>
|
| +class Foo {
|
| + Optional<double> get finiteSignificantCost => isSignificant && cost.value.isFinite ? cost : const Optional<double>.absent();
|
| + Optional<double> get finiteSignificantCost => isSignificant && cost.value.isFinite ? cost : const Optional.absent();
|
| +}
|
| +<<<
|
| +class Foo {
|
| + Optional<double> get finiteSignificantCost =>
|
| + isSignificant && cost.value.isFinite
|
| + ? cost
|
| + : const Optional<double>.absent();
|
| + Optional<double> get finiteSignificantCost =>
|
| + isSignificant && cost.value.isFinite ? cost : const Optional.absent();
|
| +}
|
| +>>> (indent 4)
|
| + main() {
|
| + this.changes.exec();
|
| + Valids.exist(doneSearch)
|
| + ? doneSearch(err)
|
| + : null;
|
| + }
|
| +<<<
|
| + main() {
|
| + this.changes.exec();
|
| + Valids.exist(doneSearch) ? doneSearch(err) : null;
|
| + }
|
| +>>> (indent 6)
|
| + main() {
|
| + var openParensMatch = new RegExp(r'\(').allMatches(matchStr),
|
| + closeParensMatch = new RegExp(r'\)').allMatches(matchStr),
|
| + numOpenParens =
|
| + (openParensMatch != null && openParensMatch.length != null) ? 1 : 0,
|
| + numCloseParens =
|
| + (closeParensMatch != null && closeParensMatch.length != null)
|
| + ? 1
|
| + : 0;
|
| + }
|
| +<<<
|
| + main() {
|
| + var openParensMatch = new RegExp(r'\(').allMatches(matchStr),
|
| + closeParensMatch = new RegExp(r'\)').allMatches(matchStr),
|
| + numOpenParens =
|
| + (openParensMatch != null && openParensMatch.length != null)
|
| + ? 1
|
| + : 0,
|
| + numCloseParens =
|
| + (closeParensMatch != null && closeParensMatch.length != null)
|
| + ? 1
|
| + : 0;
|
| + }
|
| +>>> (indent 4)
|
| + main() {
|
| + tree.Node definition = new tree.FunctionExpression(
|
| + makeIdentifier(param.name),
|
| + makeParameters(param.parameters),
|
| + null, // body
|
| + param.type == null
|
| + ? null
|
| + : makeType(param.type),
|
| + makeEmptyModifiers(), // TODO: Function parameter modifiers?
|
| + null, // initializers
|
| + null, // get/set
|
| + null); // async modifier
|
| + }
|
| +<<<
|
| + main() {
|
| + tree.Node definition = new tree.FunctionExpression(
|
| + makeIdentifier(param.name),
|
| + makeParameters(param.parameters),
|
| + null, // body
|
| + param.type == null ? null : makeType(param.type),
|
| + makeEmptyModifiers(), // TODO: Function parameter modifiers?
|
| + null, // initializers
|
| + null, // get/set
|
| + null); // async modifier
|
| + }
|
| +>>> (indent 2)
|
| + main() {
|
| + ConstantExpression constant = new TypeConstantExpression(
|
| + // TODO(johnniwinther): Use [type] when evaluation of constants is done
|
| + // directly on the constant expressions.
|
| + node.isCall
|
| + ? coreTypes.typeType
|
| + : type);
|
| + }
|
| +<<<
|
| + main() {
|
| + ConstantExpression constant = new TypeConstantExpression(
|
| + // TODO(johnniwinther): Use [type] when evaluation of constants is done
|
| + // directly on the constant expressions.
|
| + node.isCall ? coreTypes.typeType : type);
|
| + }
|
|
|