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

Unified Diff: runtime/vm/snapshot_test.cc

Issue 1644793002: Replace intptr_t with TokenDescriptor (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 | « runtime/vm/simulator_mips.cc ('k') | runtime/vm/source_report.h » ('j') | 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 7c38cbf7d83ea3fac876473adc0b3a96b38d0824..2b3df5eacc106fe34e2916407ac4886535a4db41 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -864,7 +864,9 @@ static void GenerateSourceAndCheck(const Script& script) {
// the same.
const TokenStream& expected_tokens = TokenStream::Handle(script.tokens());
TokenStream::Iterator expected_iterator(
- expected_tokens, 0, TokenStream::Iterator::kAllTokens);
+ expected_tokens,
+ TokenPosition::kMinSource,
+ 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);
@@ -872,9 +874,11 @@ static void GenerateSourceAndCheck(const Script& script) {
TokenStream::Handle(TokenStream::New(scanner.GetStream(),
private_key,
false));
- expected_iterator.SetCurrentPosition(0);
+ expected_iterator.SetCurrentPosition(TokenPosition::kMinSource);
TokenStream::Iterator reconstructed_iterator(
- reconstructed_tokens, 0, TokenStream::Iterator::kAllTokens);
+ reconstructed_tokens,
+ TokenPosition::kMinSource,
+ TokenStream::Iterator::kAllTokens);
Token::Kind expected_kind = expected_iterator.CurrentTokenKind();
Token::Kind reconstructed_kind = reconstructed_iterator.CurrentTokenKind();
String& expected_literal = String::Handle();
@@ -971,8 +975,10 @@ TEST_CASE(SerializeScript) {
const ExternalTypedData& serialized_data =
ExternalTypedData::Handle(serialized_tokens.GetStream());
EXPECT_EQ(expected_data.Length(), serialized_data.Length());
- TokenStream::Iterator expected_iterator(expected_tokens, 0);
- TokenStream::Iterator serialized_iterator(serialized_tokens, 0);
+ TokenStream::Iterator expected_iterator(expected_tokens,
+ TokenPosition::kMinSource);
+ TokenStream::Iterator serialized_iterator(serialized_tokens,
+ TokenPosition::kMinSource);
Token::Kind expected_kind = expected_iterator.CurrentTokenKind();
Token::Kind serialized_kind = serialized_iterator.CurrentTokenKind();
while (expected_kind != Token::kEOS && serialized_kind != Token::kEOS) {
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | runtime/vm/source_report.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698