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

Unified Diff: pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart

Issue 2970983003: modifiy insertTokenBefore to return the inserted token (Closed)
Patch Set: 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 | « pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
diff --git a/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart b/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
index 9aa7fe2c253a11c24d99b0a82f911aa0c35c72a9..b8e87cdcb24d08c4d90cbcfcb08ba77698d5e547 100644
--- a/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
+++ b/pkg/front_end/test/fasta/parser/token_stream_rewriter_test.dart
@@ -26,7 +26,7 @@ abstract class TokenStreamRewriterTest {
var b = _makeToken(1, 'b');
var eof = _link([a]);
var rewriter = new TokenStreamRewriter(a);
- rewriter.insertTokenBefore(b, eof);
+ expect(rewriter.insertTokenBefore(b, eof), same(b));
expect(rewriter.firstToken, same(a));
expect(a.next, same(b));
expect(b.next, same(eof));
@@ -39,7 +39,7 @@ abstract class TokenStreamRewriterTest {
var b = _makeToken(1, 'b');
_link([b]);
var rewriter = new TokenStreamRewriter(b);
- rewriter.insertTokenBefore(a, b);
+ expect(rewriter.insertTokenBefore(a, b), same(a));
expect(rewriter.firstToken, same(a));
expect(a.next, same(b));
expect(a.previous.next, same(a));
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698