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

Unified Diff: dart/compiler/javatests/com/google/dart/compiler/parser/ErrorMessageLocationTest.java

Issue 20722006: Removed compiler/ directory from repository (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
Index: dart/compiler/javatests/com/google/dart/compiler/parser/ErrorMessageLocationTest.java
diff --git a/dart/compiler/javatests/com/google/dart/compiler/parser/ErrorMessageLocationTest.java b/dart/compiler/javatests/com/google/dart/compiler/parser/ErrorMessageLocationTest.java
deleted file mode 100644
index cb1376aa93aa025d48d16b65fe289d7356579e5f..0000000000000000000000000000000000000000
--- a/dart/compiler/javatests/com/google/dart/compiler/parser/ErrorMessageLocationTest.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.parser;
-
-import com.google.dart.compiler.DartCompilationError;
-
-import junit.framework.TestCase;
-
-import java.util.List;
-
-/**
- * Test that error messages cover the correct locations in the source code.
- */
-public class ErrorMessageLocationTest extends TestCase {
- /**
- * Test that unexpected token highlights the correct location in the file.
- */
- public void testUnexpectedTokenErrorMessage() {
- String sourceCode =
- "// Empty comment\n" +
- "class foo while Bar {\n" +
- "}";
-
- DartParserRunner runner = DartParserRunner.parse(getName(), sourceCode);
- List<DartCompilationError> actualErrors = runner.getErrors();
-
- // Due to error recovery more than a single error is generated
- DartCompilationError actualError = actualErrors.get(0);
-
- String errorTokenString = "while";
- assertEquals(11, actualError.getColumnNumber());
- assertEquals(errorTokenString.length(), actualError.getLength());
- assertEquals(2, actualError.getLineNumber());
- assertEquals(sourceCode.indexOf(errorTokenString), actualError.getStartPosition());
- }
-
- public void testExpectedLeftParenErrorMessage1() {
- String sourceCode =
- "// comment to change the line\n" +
- "main () {\n" +
- " var x = new PART1.PART2.PART3.PART4();\n" +
- "}\n";
-
- DartParserRunner runner = DartParserRunner.parse(getName(), sourceCode);
- List<DartCompilationError> actualErrors = runner.getErrors();
-
- // Due to error recovery more than a single error is generated
- DartCompilationError actualError = actualErrors.get(0);
-
- String errorTokenString = "PART4";
- assertEquals(33, actualError.getColumnNumber());
- assertEquals(errorTokenString.length(), actualError.getLength());
- assertEquals(3, actualError.getLineNumber());
- assertEquals(sourceCode.indexOf(errorTokenString), actualError.getStartPosition());
- }
-}

Powered by Google App Engine
This is Rietveld 408576698