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

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

Issue 1528983004: Add support for the "external" keyword to summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
Index: pkg/analyzer/test/src/summary/resynthesize_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index 1879020c3a1427dc29d0da168aa8ba562c4b7e6f..307b104b678df6e164e8fb5c4bb3377c6733d3b0 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -533,6 +533,10 @@ class E {
checkLibrary('class C { const C(); }');
}
+ test_class_constructor_const_external() {
+ checkLibrary('class C { external const C(); }');
+ }
+
test_class_constructor_explicit_named() {
checkLibrary('class C { C.foo(); }');
}
@@ -545,6 +549,10 @@ class E {
checkLibrary('class C { C(); }');
}
+ test_class_constructor_external() {
+ checkLibrary('class C { external C(); }');
+ }
+
test_class_constructor_factory() {
checkLibrary('class C { factory C() => null; }');
}
@@ -577,6 +585,10 @@ class E {
checkLibrary('class C { int i; int j; }');
}
+ test_class_getter_external() {
+ checkLibrary('class C { external int get x; }');
+ }
+
test_class_getter_static() {
checkLibrary('class C { static int get x => null; }');
}
@@ -589,6 +601,10 @@ class E {
checkLibrary('class C implements D, E {} class D {} class E {}');
}
+ test_class_method_external() {
+ checkLibrary('class C { external f(); }');
+ }
+
test_class_method_params() {
checkLibrary('class C { f(x, y) {} }');
}
@@ -605,6 +621,10 @@ class E {
checkLibrary('class C extends Object with D, E {} class D {} class E {}');
}
+ test_class_setter_external() {
+ checkLibrary('class C { external void set x(int value); }');
+ }
+
test_class_setter_static() {
checkLibrary('class C { static void set x(int value) {} }');
}
@@ -666,6 +686,10 @@ class E {
checkLibrary('export "a.dart"; export "b.dart";');
}
+ test_function_external() {
+ checkLibrary('external f();');
+ }
+
test_function_parameter_kind_named() {
// TODO(paulberry): also test default value.
checkLibrary('f({x}) {}');
@@ -716,6 +740,10 @@ class E {
checkLibrary('f() {} g() {}');
}
+ test_getter_external() {
+ checkLibrary('external int get x;');
+ }
+
test_getters() {
checkLibrary('int get x => null; get y => null;');
}
@@ -766,6 +794,14 @@ class E {
checkLibrary('class C { f(void g()) {} }');
}
+ test_operator() {
+ checkLibrary('class C { C operator+(C other) => null; }');
+ }
+
+ test_operator_external() {
+ checkLibrary('class C { external C operator+(C other); }');
+ }
+
test_operator_index() {
checkLibrary('class C { bool operator[](int i) => null; }');
}
@@ -780,6 +816,10 @@ class E {
checkLibrary('library my.lib; part "a.dart"; part "b.dart";');
}
+ test_setter_external() {
+ checkLibrary('external void set x(int value);');
+ }
+
test_setters() {
checkLibrary('void set x(int value) {} set y(value) {}');
}

Powered by Google App Engine
This is Rietveld 408576698