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

Unified Diff: runtime/vm/scopes_test.cc

Issue 9325047: Add token index position to classes and types for more accurate error reporting. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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/scanner.h ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scopes_test.cc
===================================================================
--- runtime/vm/scopes_test.cc (revision 3964)
+++ runtime/vm/scopes_test.cc (working copy)
@@ -9,21 +9,23 @@
namespace dart {
-static const intptr_t kPos = 1; // Dummy token index in non-existing source.
-
-
TEST_CASE(LocalScope) {
// Allocate a couple of local variables first.
const Type& dynamic_type = Type::ZoneHandle(Type::DynamicType());
const String& a = String::ZoneHandle(String::New("a"));
- LocalVariable* var_a = new LocalVariable(kPos, a, dynamic_type);
- LocalVariable* inner_var_a = new LocalVariable(kPos, a, dynamic_type);
+ LocalVariable* var_a =
+ new LocalVariable(Scanner::kDummyTokenIndex, a, dynamic_type);
+ LocalVariable* inner_var_a =
+ new LocalVariable(Scanner::kDummyTokenIndex, a, dynamic_type);
const String& b = String::ZoneHandle(String::New("b"));
- LocalVariable* var_b = new LocalVariable(kPos, b, dynamic_type);
+ LocalVariable* var_b =
+ new LocalVariable(Scanner::kDummyTokenIndex, b, dynamic_type);
const String& c = String::ZoneHandle(String::New("c"));
- LocalVariable* var_c = new LocalVariable(kPos, c, dynamic_type);
+ LocalVariable* var_c =
+ new LocalVariable(Scanner::kDummyTokenIndex, c, dynamic_type);
const String& L = String::ZoneHandle(String::New("L"));
- SourceLabel* label_L = new SourceLabel(kPos, L, SourceLabel::kFor);
+ SourceLabel* label_L =
+ new SourceLabel(Scanner::kDummyTokenIndex, L, SourceLabel::kFor);
LocalScope* outer_scope = new LocalScope(NULL, 0, 0);
LocalScope* inner_scope1 = new LocalScope(outer_scope, 0, 0);
« no previous file with comments | « runtime/vm/scanner.h ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698