Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: packages/dart_style/test/regression/0500/0506.unit

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
+ }
« no previous file with comments | « packages/dart_style/test/regression/0500/0503.unit ('k') | packages/dart_style/test/regression/0500/0511.unit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698