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

Side by Side Diff: pkg/analysis_server/test/services/completion/dart/optype_test.dart

Issue 2394683006: Switch analysis_server to use 'package:test'. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.services.completion.contributor.dart.optype; 5 library test.services.completion.contributor.dart.optype;
6 6
7 import 'package:analysis_server/src/protocol_server.dart'; 7 import 'package:analysis_server/src/protocol_server.dart';
8 import 'package:analysis_server/src/provisional/completion/dart/completion_targe t.dart'; 8 import 'package:analysis_server/src/provisional/completion/dart/completion_targe t.dart';
9 import 'package:analysis_server/src/services/completion/dart/optype.dart'; 9 import 'package:analysis_server/src/services/completion/dart/optype.dart';
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
11 import 'package:analyzer/src/generated/engine.dart'; 11 import 'package:analyzer/src/generated/engine.dart';
12 import 'package:analyzer/src/generated/source.dart'; 12 import 'package:analyzer/src/generated/source.dart';
13 import 'package:plugin/manager.dart'; 13 import 'package:plugin/manager.dart';
14 import 'package:test/test.dart';
14 import 'package:test_reflective_loader/test_reflective_loader.dart'; 15 import 'package:test_reflective_loader/test_reflective_loader.dart';
15 import 'package:unittest/unittest.dart';
16 16
17 import '../../../abstract_context.dart'; 17 import '../../../abstract_context.dart';
18 import '../../../utils.dart'; 18 import '../../../utils.dart';
19 19
20 main() { 20 main() {
21 initializeTestEnvironment(); 21 initializeTestEnvironment();
22 defineReflectiveTests(OpTypeTest); 22 defineReflectiveSuite(() {
23 defineReflectiveTests(OpTypeTest);
24 });
23 } 25 }
24 26
25 @reflectiveTest 27 @reflectiveTest
26 class OpTypeTest { 28 class OpTypeTest {
27 OpType visitor; 29 OpType visitor;
28 30
29 void addTestSource(String content, {bool resolved: false}) { 31 void addTestSource(String content, {bool resolved: false}) {
30 int offset = content.indexOf('^'); 32 int offset = content.indexOf('^');
31 expect(offset, isNot(equals(-1)), reason: 'missing ^'); 33 expect(offset, isNot(equals(-1)), reason: 'missing ^');
32 int nextOffset = content.indexOf('^', offset + 1); 34 int nextOffset = content.indexOf('^', offset + 1);
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 String get shortName => fullName; 1572 String get shortName => fullName;
1571 1573
1572 @override 1574 @override
1573 Source get source => this; 1575 Source get source => this;
1574 1576
1575 @override 1577 @override
1576 Uri get uri => new Uri.file(fullName); 1578 Uri get uri => new Uri.file(fullName);
1577 1579
1578 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 1580 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
1579 } 1581 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698