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

Unified Diff: pkg/analysis_services/test/correction/source_range_test.dart

Issue 484733003: Import analysis_services.dart into analysis_server.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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: pkg/analysis_services/test/correction/source_range_test.dart
diff --git a/pkg/analysis_services/test/correction/source_range_test.dart b/pkg/analysis_services/test/correction/source_range_test.dart
deleted file mode 100644
index 53e76d939a02c976483cb9376e195984ee13afbb..0000000000000000000000000000000000000000
--- a/pkg/analysis_services/test/correction/source_range_test.dart
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) 2014, 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.
-
-library test.services.correction.source_range;
-
-import 'package:analysis_services/src/correction/source_range.dart';
-import 'package:analysis_testing/abstract_single_unit.dart';
-import 'package:analysis_testing/reflective_tests.dart';
-import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/element.dart';
-import 'package:analyzer/src/generated/error.dart';
-import 'package:analyzer/src/generated/parser.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:unittest/unittest.dart';
-
-
-main() {
- groupSep = ' | ';
- runReflectiveTests(SourceRangesTest);
-}
-
-
-@ReflectiveTestCase()
-class SourceRangesTest extends AbstractSingleUnitTest {
- void test_rangeElementName() {
- resolveTestUnit('class ABC {}');
- Element element = findElement('ABC');
- expect(rangeElementName(element), new SourceRange(6, 3));
- }
-
- void test_rangeEndEnd_nodeNode() {
- resolveTestUnit('main() {}');
- FunctionDeclaration mainFunction = testUnit.declarations[0];
- SimpleIdentifier mainName = mainFunction.name;
- FunctionBody mainBody = mainFunction.functionExpression.body;
- expect(rangeEndEnd(mainName, mainBody), new SourceRange(4, 5));
- }
-
- void test_rangeEndStart_nodeNode() {
- resolveTestUnit('main() {}');
- FunctionDeclaration mainFunction = testUnit.declarations[0];
- SimpleIdentifier mainName = mainFunction.name;
- FunctionBody mainBody = mainFunction.functionExpression.body;
- expect(rangeEndStart(mainName, mainBody), new SourceRange(4, 3));
- }
-
- void test_rangeError() {
- AnalysisError error =
- new AnalysisError.con2(null, 10, 5, ParserErrorCode.CONST_CLASS, []);
- expect(rangeError(error), new SourceRange(10, 5));
- }
-
- void test_rangeNode() {
- resolveTestUnit('main() {}');
- FunctionDeclaration mainFunction = testUnit.declarations[0];
- SimpleIdentifier mainName = mainFunction.name;
- expect(rangeNode(mainName), new SourceRange(0, 4));
- }
-
- void test_rangeNodes() {
- resolveTestUnit(' main() {}');
- FunctionDeclaration mainFunction = testUnit.declarations[0];
- SimpleIdentifier mainName = mainFunction.name;
- FunctionBody mainBody = mainFunction.functionExpression.body;
- expect(rangeNodes([mainName, mainBody]), new SourceRange(1, 9));
- }
-
- void test_rangeNodes_empty() {
- resolveTestUnit('main() {}');
- FunctionDeclaration mainFunction = testUnit.declarations[0];
- SimpleIdentifier mainName = mainFunction.name;
- FunctionBody mainBody = mainFunction.functionExpression.body;
- expect(rangeNodes([]), new SourceRange(0, 0));
- }
-
- void test_rangeStartEnd_intInt() {
- expect(rangeStartEnd(10, 25), new SourceRange(10, 15));
- }
-
- void test_rangeStartEnd_nodeNode() {
- resolveTestUnit(' main() {}');
- FunctionDeclaration mainFunction = testUnit.declarations[0];
- SimpleIdentifier mainName = mainFunction.name;
- FunctionBody mainBody = mainFunction.functionExpression.body;
- expect(rangeStartEnd(mainName, mainBody), new SourceRange(1, 9));
- }
-
- void test_rangeStartLength_int() {
- expect(rangeStartLength(5, 10), new SourceRange(5, 10));
- }
-
- void test_rangeStartLength_node() {
- resolveTestUnit(' main() {}');
- FunctionDeclaration mainFunction = testUnit.declarations[0];
- SimpleIdentifier mainName = mainFunction.name;
- expect(rangeStartLength(mainName, 10), new SourceRange(1, 10));
- }
-
- void test_rangeStartStart_intInt() {
- expect(rangeStartStart(10, 25), new SourceRange(10, 15));
- }
-
- void test_rangeStartStart_nodeNode() {
- resolveTestUnit('main() {}');
- FunctionDeclaration mainFunction = testUnit.declarations[0];
- SimpleIdentifier mainName = mainFunction.name;
- FunctionBody mainBody = mainFunction.functionExpression.body;
- expect(rangeStartStart(mainName, mainBody), new SourceRange(0, 7));
- }
-
- void test_rangeToken() {
- resolveTestUnit(' main() {}');
- FunctionDeclaration mainFunction = testUnit.declarations[0];
- SimpleIdentifier mainName = mainFunction.name;
- expect(rangeToken(mainName.beginToken), new SourceRange(1, 4));
- }
-}

Powered by Google App Engine
This is Rietveld 408576698