Index: runtime/vm/code_descriptors_test.cc |
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc |
index 37de3e489f005f8894e75f10b3047e3154e7175c..5f8bb1d0651a891dc2ed47c9e6c2bc8e3467bdf3 100644 |
--- a/runtime/vm/code_descriptors_test.cc |
+++ b/runtime/vm/code_descriptors_test.cc |
@@ -18,7 +18,7 @@ |
namespace dart { |
-static const intptr_t kPos = Token::kNoSourcePos; |
+static const TokenPosition kPos = TokenPosition::kNoSource; |
CODEGEN_TEST_GENERATE(StackmapCodegen, test) { |
@@ -293,15 +293,15 @@ TEST_CASE(DescriptorList_TokenPositions) { |
33, |
5, |
5, |
- Token::kMinSourcePos, |
- Token::kMaxSourcePos, |
+ TokenPosition::kMinSourcePos, |
+ TokenPosition::kMaxSourcePos, |
}; |
const intptr_t num_token_positions = |
sizeof(token_positions) / sizeof(token_positions[0]); |
for (intptr_t i = 0; i < num_token_positions; i++) { |
descriptors->AddDescriptor(RawPcDescriptors::kRuntimeCall, 0, 0, |
- token_positions[i], 0); |
+ TokenPosition(token_positions[i]), 0); |
} |
const PcDescriptors& finalized_descriptors = |
@@ -313,11 +313,11 @@ TEST_CASE(DescriptorList_TokenPositions) { |
intptr_t i = 0; |
while (it.MoveNext()) { |
- if (token_positions[i] != it.TokenPos()) { |
+ if (token_positions[i] != it.TokenPos().value()) { |
OS::Print("[%" Pd "]: Expected: %" Pd " != %" Pd "\n", |
- i, token_positions[i], it.TokenPos()); |
+ i, token_positions[i], it.TokenPos().value()); |
} |
- EXPECT(token_positions[i] == it.TokenPos()); |
+ EXPECT(token_positions[i] == it.TokenPos().value()); |
i++; |
} |
} |
@@ -339,8 +339,8 @@ TEST_CASE(CodeSourceMap_TokenPositions) { |
33, |
5, |
5, |
- Token::kMinSourcePos, |
- Token::kMaxSourcePos, |
+ TokenPosition::kMinSourcePos, |
+ TokenPosition::kMaxSourcePos, |
}; |
const intptr_t num_token_positions = |
sizeof(token_positions) / sizeof(token_positions[0]); |
@@ -349,7 +349,7 @@ TEST_CASE(CodeSourceMap_TokenPositions) { |
ASSERT(builder != NULL); |
for (intptr_t i = 0; i < num_token_positions; i++) { |
- builder->AddEntry(i, token_positions[i]); |
+ builder->AddEntry(i, TokenPosition(token_positions[i])); |
} |
const CodeSourceMap& code_Source_map = |
@@ -361,11 +361,11 @@ TEST_CASE(CodeSourceMap_TokenPositions) { |
uintptr_t i = 0; |
while (it.MoveNext()) { |
EXPECT(it.PcOffset() == i); |
- if (token_positions[i] != it.TokenPos()) { |
+ if (token_positions[i] != it.TokenPos().value()) { |
OS::Print("[%" Pd "]: Expected: %" Pd " != %" Pd "\n", |
- i, token_positions[i], it.TokenPos()); |
+ i, token_positions[i], it.TokenPos().value()); |
} |
- EXPECT(token_positions[i] == it.TokenPos()); |
+ EXPECT(token_positions[i] == it.TokenPos().value()); |
i++; |
} |
} |