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

Unified Diff: pkg/analyzer/test/src/summary/summary_test.dart

Issue 1530363002: Fix summary resynthesis for operators ending in '='. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Konstantin's suggestion Created 5 years 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
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/summary_test.dart
diff --git a/pkg/analyzer/test/src/summary/summary_test.dart b/pkg/analyzer/test/src/summary/summary_test.dart
index d04200ef85ed439fc21a65826ce63fd74bc235c6..7346094d429090269328c2851b1979d355cfe7b8 100644
--- a/pkg/analyzer/test/src/summary/summary_test.dart
+++ b/pkg/analyzer/test/src/summary/summary_test.dart
@@ -1286,6 +1286,13 @@ typedef F();
expect(executable.isExternal, false);
}
+ test_executable_operator_equal() {
+ UnlinkedExecutable executable =
+ serializeClassText('class C { bool operator==(C other) => false; }')
+ .executables[0];
+ expect(executable.name, '==');
+ }
+
test_executable_operator_external() {
UnlinkedExecutable executable =
serializeClassText('class C { external C operator+(C c); }')
@@ -1293,6 +1300,13 @@ typedef F();
expect(executable.isExternal, true);
}
+ test_executable_operator_greater_equal() {
+ UnlinkedExecutable executable =
+ serializeClassText('class C { bool operator>=(C other) => false; }')
+ .executables[0];
+ expect(executable.name, '>=');
+ }
+
test_executable_operator_index() {
UnlinkedExecutable executable =
serializeClassText('class C { bool operator[](int i) => null; }')
@@ -1324,6 +1338,13 @@ typedef F();
expect(executable.typeParameters, isEmpty);
}
+ test_executable_operator_less_equal() {
+ UnlinkedExecutable executable =
+ serializeClassText('class C { bool operator<=(C other) => false; }')
+ .executables[0];
+ expect(executable.name, '<=');
+ }
+
test_executable_param_function_typed() {
UnlinkedExecutable executable = serializeExecutableText('f(g()) {}');
expect(executable.parameters[0].isFunctionTyped, isTrue);
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698