Skip to content

Commit 5fbd9c7

Browse files
authored
Merge pull request #1179 from dart-lang/regen
regen test docs
2 parents da00ea7 + f929683 commit 5fbd9c7

File tree

21 files changed

+67
-47
lines changed

21 files changed

+67
-47
lines changed

lib/src/model_utils.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
library dartdoc.model_utils;
66

7-
import 'dart:io';
87
import 'dart:convert';
8+
import 'dart:io';
99

1010
import 'package:analyzer/dart/element/element.dart';
1111
import 'package:analyzer/dart/element/type.dart';
1212
import 'package:analyzer/src/generated/engine.dart';
1313
import 'package:analyzer/src/generated/sdk.dart';
1414
import 'package:analyzer/src/generated/source_io.dart';
15-
import 'package:path/path.dart' as p;
15+
1616
import 'config.dart';
1717

1818
final Map<String, String> _fileContents = <String, String>{};

test/model_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ String topLevelFunction(int param1, bool param2, Cool coolBeans,
948948
new File(p.join(Directory.current.path, "crossdart.json"))
949949
.writeAsStringSync("""
950950
{"testing/test_package/lib/fake.dart":
951-
{"references":[{"offset":5806,"end":5809,"remotePath":"http://www.example.com/fake.dart"}]}}
951+
{"references":[{"offset":1069,"end":1072,"remotePath":"http://www.example.com/fake.dart"}]}}
952952
""");
953953

954954
initializeConfig(addCrossdart: true, inputDir: Directory.current);

testing/test_package/lib/fake.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ import 'css.dart' as css;
5050

5151
import 'two_exports.dart' show BaseClass;
5252

53+
class HasGenerics<X, Y, Z> {
54+
HasGenerics(X x, Y y, Z z) {}
55+
56+
X returnX() => null;
57+
58+
Z returnZ() => null;
59+
60+
Z doStuff(String s, X x) => null;
61+
62+
/// Converts itself to a map.
63+
Map<X, Y> convertToMap() => null;
64+
}
65+
5366
Map<dynamic, String> mapWithDynamicKeys = {};
5467

5568
/// Useful for annotations.
@@ -257,19 +270,6 @@ class Foo2 {
257270
static const Foo2 BAZ = const Foo2(1);
258271
}
259272

260-
class HasGenerics<X, Y, Z> {
261-
HasGenerics(X x, Y y, Z z) {}
262-
263-
X returnX() => null;
264-
265-
Z returnZ() => null;
266-
267-
Z doStuff(String s, X x) => null;
268-
269-
/// Converts itself to a map.
270-
Map<X, Y> convertToMap() => null;
271-
}
272-
273273
class OtherGenericsThing<A> {
274274
HasGenerics<A, Cool, String> convert() => null;
275275
}

testing/test_package_docs/ex/Dog-class.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ <h5><a href="ex/ex-library.html">ex</a></h5>
134134
<div class="col-xs-12 col-sm-9 col-md-8 main-content">
135135

136136
<section class="desc markdown">
137-
<p>implements <a href="ex/Cat-class.html">Cat</a>, <a href="ex/E-class.html">E</a></p>
137+
<p>implements <a href="ex/Cat-class.html">Cat</a>, <a href="ex/E-class.html">E</a>
138+
{@example core/pipes/ts/slice_pipe/slice_pipe_example.ts region='SlicePipe_list'}</p>
138139
</section>
139140

140141
<section>

testing/test_package_docs/ex/ex-library.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ <h2>Classes</h2>
335335
<span class="name "><a href="ex/Dog-class.html">Dog</a></span>
336336
</dt>
337337
<dd>
338-
<p>implements <a href="ex/Cat-class.html">Cat</a>, <a href="ex/E-class.html">E</a></p>
338+
<p>implements <a href="ex/Cat-class.html">Cat</a>, <a href="ex/E-class.html">E</a>
339+
{@example core/pipes/ts/slice_pipe/slice_pipe_example.ts region='SlicePipe_list'}</p>
339340
</dd>
340341
<dt id="E">
341342
<span class="name "><a href="ex/E-class.html">E</a></span>

testing/test_package_docs/fake/ExtraSpecialList-class.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ <h2>Methods</h2>
678678
</span>
679679
</dt>
680680
<dd class="inherited">
681-
<p>Returns an Iterable that provides all but the first <code>count</code> elements.<a href="fake/ExtraSpecialList/skip.html">&hellip;</a>
681+
<p>Returns an <code>Iterable</code> that provides all but the first <code>count</code> elements.<a href="fake/ExtraSpecialList/skip.html">&hellip;</a>
682682
</p>
683683
<div class="features">inherited</div>
684684
</dd>
@@ -688,7 +688,7 @@ <h2>Methods</h2>
688688
</span>
689689
</dt>
690690
<dd class="inherited">
691-
<p>Returns an Iterable that skips leading elements while <code>test</code> is satisfied.<a href="fake/ExtraSpecialList/skipWhile.html">&hellip;</a>
691+
<p>Returns an <code>Iterable</code> that skips leading elements while <code>test</code> is satisfied.<a href="fake/ExtraSpecialList/skipWhile.html">&hellip;</a>
692692
</p>
693693
<div class="features">inherited</div>
694694
</dd>

testing/test_package_docs/fake/ExtraSpecialList/firstWhere.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ <h5><a href="fake/ExtraSpecialList-class.html">ExtraSpecialList</a></h5>
154154
</section>
155155
<section class="desc markdown">
156156
<p>Returns the first element that satisfies the given predicate <code>test</code>.</p>
157-
<p>Iterates through elements and returns the first to satsify <code>test</code>.</p>
157+
<p>Iterates through elements and returns the first to satisfy <code>test</code>.</p>
158158
<p>If no element satisfies <code>test</code>, the result of invoking the <code>orElse</code>
159159
function is returned.
160160
If <code>orElse</code> is omitted, it defaults to throwing a <code>StateError</code>.</p>

testing/test_package_docs/fake/ExtraSpecialList/lastWhere.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ <h5><a href="fake/ExtraSpecialList-class.html">ExtraSpecialList</a></h5>
160160
The default implementation iterates elements in iteration order,
161161
checks <code>test(element)</code> for each,
162162
and finally returns that last one that matched.</p>
163-
<p>If no element satsfies <code>test</code>, the result of invoking the <code>orElse</code>
163+
<p>If no element satisfies <code>test</code>, the result of invoking the <code>orElse</code>
164164
function is returned.
165165
If <code>orElse</code> is omitted, it defaults to throwing a <code>StateError</code>.</p>
166166
</section>

testing/test_package_docs/fake/ExtraSpecialList/map.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ <h5><a href="fake/ExtraSpecialList-class.html">ExtraSpecialList</a></h5>
158158
<p>This method returns a view of the mapped elements. As long as the
159159
returned <code>Iterable</code> is not iterated over, the supplied function <code>f</code> will
160160
not be invoked. The transformed elements will not be cached. Iterating
161-
multiple times over the the returned <code>Iterable</code> will invoke the supplied
161+
multiple times over the returned <code>Iterable</code> will invoke the supplied
162162
function <code>f</code> multiple times on the same element.</p>
163163
<p>Methods on the returned iterable are allowed to omit calling <code>f</code>
164164
on any element where the result isn't needed.

testing/test_package_docs/fake/ExtraSpecialList/skip.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,16 @@ <h5><a href="fake/ExtraSpecialList-class.html">ExtraSpecialList</a></h5>
153153
<span class="name ">skip</span>(<wbr><span class="parameter" id="skip-param-count"><span class="type-annotation">int</span> <span class="parameter-name">count</span></span>)
154154
</section>
155155
<section class="desc markdown">
156-
<p>Returns an Iterable that provides all but the first <code>count</code> elements.</p>
156+
<p>Returns an <code>Iterable</code> that provides all but the first <code>count</code> elements.</p>
157157
<p>When the returned iterable is iterated, it starts iterating over <code>this</code>,
158158
first skipping past the initial <code>count</code> elements.
159159
If <code>this</code> has fewer than <code>count</code> elements, then the resulting Iterable is
160160
empty.
161161
After that, the remaining elements are iterated in the same order as
162162
in this iterable.</p>
163+
<p>Some iterables may be able to find later elements without first iterating
164+
through earlier elements, for example when iterating a <code>List</code>.
165+
Such iterables are allowed to ignore the initial skipped elements.</p>
163166
<p>The <code>count</code> must not be negative.</p>
164167
</section>
165168

0 commit comments

Comments
 (0)