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

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

Issue 2990523002: Parse documentation for class aliases, fix for /// comments. (Closed)
Patch Set: Fix and test mix of comment styles. 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 2c8617a31838aed70c625d5e5d7506e9f0e1210b..cf8d61a21ca55d1f92e23c3b11f39d61d8ebcaba 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -1405,6 +1405,54 @@ class E {
test_class_alias_documented() async {
var library = await checkLibrary('''
+/**
+ * Docs
+ */
+class C = D with E;
+
+class D {}
+class E {}
+''');
+ checkElementText(library, r'''
+/**
+ * Docs
+ */
+class alias C extends D with E {
+ synthetic C() = D;
+}
+class D {
+}
+class E {
+}
+''');
+ }
+
+ test_class_alias_documented_tripleSlash() async {
+ var library = await checkLibrary('''
+/// aaa
+/// b
+/// cc
+class C = D with E;
+
+class D {}
+class E {}
+''');
+ checkElementText(library, r'''
+/// aaa
+/// b
+/// cc
+class alias C extends D with E {
+ synthetic C() = D;
+}
+class D {
+}
+class E {
+}
+''');
+ }
+
+ test_class_alias_documented_withLeadingNonDocumentation() async {
+ var library = await checkLibrary('''
// Extra comment so doc comment offset != 0
/**
* Docs
@@ -1814,6 +1862,70 @@ class C {
''');
}
+ test_class_documented_mix() async {
+ var library = await checkLibrary('''
+/**
+ * aaa
+ */
+/**
+ * bbb
+ */
+class A {}
+
+/**
+ * aaa
+ */
+/// bbb
+/// ccc
+class B {}
+
+/// aaa
+/// bbb
+/**
+ * ccc
+ */
+class C {}
+
+/// aaa
+/// bbb
+/**
+ * ccc
+ */
+/// ddd
+class D {}
+
+/**
+ * aaa
+ */
+// bbb
+class E {}
+''');
+ checkElementText(library, r'''
+/**
+ * bbb
+ */
+class A {
+}
+/// bbb
+/// ccc
+class B {
+}
+/**
+ * ccc
+ */
+class C {
+}
+/// ddd
+class D {
+}
+/**
+ * aaa
+ */
+class E {
+}
+''');
+ }
+
test_class_documented_tripleSlash() async {
var library = await checkLibrary('''
/// aaa
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698