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

Unified Diff: runtime/vm/snapshot_test.cc

Issue 24272007: Use newline tokens when generating source from tokenstream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot_test.cc
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index fdcf6c027809cf135dd45fd9d83da584780eb27e..647b802e1ff3f226f3139cd09ae483376b817aab 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -839,14 +839,16 @@ static void GenerateSourceAndCheck(const Script& script) {
// Rescan this source and compare the token stream to see if they are
// the same.
const TokenStream& expected_tokens = TokenStream::Handle(script.tokens());
- TokenStream::Iterator expected_iterator(expected_tokens, 0);
+ TokenStream::Iterator expected_iterator(
+ expected_tokens, 0, TokenStream::Iterator::kAllTokens);
const String& str = String::Handle(expected_tokens.GenerateSource());
const String& private_key = String::Handle(expected_tokens.PrivateKey());
Scanner scanner(str, private_key);
const TokenStream& reconstructed_tokens =
TokenStream::Handle(TokenStream::New(scanner.GetStream(), private_key));
expected_iterator.SetCurrentPosition(0);
- TokenStream::Iterator reconstructed_iterator(reconstructed_tokens, 0);
+ TokenStream::Iterator reconstructed_iterator(
+ reconstructed_tokens, 0, TokenStream::Iterator::kAllTokens);
Token::Kind expected_kind = expected_iterator.CurrentTokenKind();
Token::Kind reconstructed_kind = reconstructed_iterator.CurrentTokenKind();
String& expected_literal = String::Handle();
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698