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

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

Issue 1625543002: Use the explicit string 'void' to refer to void in summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | pkg/analyzer/tool/summary/idl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/summary_common.dart
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index f1a320f79079acb25d97c056c0c6288104fb828c..f8f6fd1ca43dc7c883f917e782909e51ac7122f9 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -546,6 +546,13 @@ abstract class SummaryTest {
unlinkedSourceUnit: unlinkedSourceUnit);
}
+ /**
+ * Verify that the given [typeRef] represents the type `void`.
+ */
+ void checkVoidTypeRef(EntityRef typeRef) {
+ checkTypeRef(typeRef, null, null, 'void');
+ }
+
fail_enum_value_documented() {
// TODO(paulberry): currently broken because of dartbug.com/25385
String text = '''
@@ -2603,7 +2610,7 @@ enum E { v }''';
expect(executable.isFactory, false);
expect(executable.isStatic, false);
expect(executable.parameters, hasLength(2));
- expect(executable.returnType, isNull);
+ checkVoidTypeRef(executable.returnType);
expect(executable.typeParameters, isEmpty);
}
@@ -2659,7 +2666,7 @@ enum E { v }''';
test_executable_param_function_typed_return_type_void() {
UnlinkedExecutable executable = serializeExecutableText('f(void g()) {}');
- expect(executable.parameters[0].type, isNull);
+ checkVoidTypeRef(executable.parameters[0].type);
}
test_executable_param_kind_named() {
@@ -2734,7 +2741,7 @@ enum E { v }''';
test_executable_return_type_void() {
UnlinkedExecutable executable = serializeExecutableText('void f() {}');
- expect(executable.returnType, isNull);
+ checkVoidTypeRef(executable.returnType);
}
test_executable_setter() {
@@ -2773,7 +2780,7 @@ enum E { v }''';
test_executable_setter_type() {
UnlinkedExecutable executable =
serializeExecutableText('void set f(int value) {}', 'f=');
- expect(executable.returnType, isNull);
+ checkVoidTypeRef(executable.returnType);
expect(executable.parameters, hasLength(1));
expect(executable.parameters[0].name, 'value');
checkTypeRef(
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | pkg/analyzer/tool/summary/idl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698