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

Unified Diff: runtime/vm/scanner_test.cc

Issue 24359005: Make Script::GetTokenLocation() and Script::TokenRangeAtLine() use token streams where possible. (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_test.cc ('K') | « runtime/vm/scanner.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scanner_test.cc
diff --git a/runtime/vm/scanner_test.cc b/runtime/vm/scanner_test.cc
index bf56873136b8dd4478aa2f0717676df2059d8a09..7e8a0533fa29dd4051111215d92286742ee0f58c 100644
--- a/runtime/vm/scanner_test.cc
+++ b/runtime/vm/scanner_test.cc
@@ -410,28 +410,6 @@ void InvalidText() {
}
-void FindLineTest() {
- const char* source =
- "/*1*/ \n"
- "/*2*/ class A {\n"
- "/*3*/ void foo() { }\n"
- "/*4*/ }\n";
-
- Scanner scanner(String::Handle(String::New(source)),
- String::Handle(String::New("")));
-
- intptr_t first_token_index, last_token_index;
- scanner.TokenRangeAtLine(3, &first_token_index, &last_token_index);
- EXPECT_EQ(3, first_token_index);
- EXPECT_EQ(8, last_token_index);
- scanner.TokenRangeAtLine(100, &first_token_index, &last_token_index);
- EXPECT(first_token_index < 0);
- scanner.TokenRangeAtLine(1, &first_token_index, &last_token_index);
- EXPECT_EQ(0, first_token_index);
- EXPECT(last_token_index < 0);
-}
-
-
void NewlinesTest() {
const char* source =
"var es = /* a\n"
@@ -479,7 +457,6 @@ TEST_CASE(Scanner_Test) {
EmptyMultilineString();
NumberLiteral();
InvalidText();
- FindLineTest();
NewlinesTest();
}
« runtime/vm/object_test.cc ('K') | « runtime/vm/scanner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698