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

Side by Side Diff: pkg/analysis_server/test/services/correction/change_test.dart

Issue 709493002: Fix 'Unused local variable' hints in analyzer and analysis_server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
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.correction.change; 5 library test.services.correction.change;
6 6
7 import 'package:analysis_server/src/constants.dart'; 7 import 'package:analysis_server/src/constants.dart';
8 import 'package:analysis_server/src/protocol_server.dart'; 8 import 'package:analysis_server/src/protocol_server.dart';
9 import 'package:analyzer/src/generated/source.dart'; 9 import 'package:analyzer/src/generated/source.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void test_editFromRange() { 154 void test_editFromRange() {
155 SourceRange range = new SourceRange(1, 2); 155 SourceRange range = new SourceRange(1, 2);
156 SourceEdit edit = newSourceEdit_range(range, 'foo'); 156 SourceEdit edit = newSourceEdit_range(range, 'foo');
157 expect(edit.offset, 1); 157 expect(edit.offset, 1);
158 expect(edit.length, 2); 158 expect(edit.length, 2);
159 expect(edit.replacement, 'foo'); 159 expect(edit.replacement, 'foo');
160 } 160 }
161 161
162 void test_eqEq() { 162 void test_eqEq() {
163 SourceEdit a = new SourceEdit(1, 2, 'aaa'); 163 SourceEdit a = new SourceEdit(1, 2, 'aaa');
164 SourceEdit a2 = new SourceEdit(1, 2, 'aaa');
165 SourceEdit b = new SourceEdit(1, 2, 'aaa');
166 expect(a == a, isTrue); 164 expect(a == a, isTrue);
167 expect(a == new SourceEdit(1, 2, 'aaa'), isTrue); 165 expect(a == new SourceEdit(1, 2, 'aaa'), isTrue);
168 expect(a == this, isFalse); 166 expect(a == this, isFalse);
169 expect(a == new SourceEdit(1, 2, 'bbb'), isFalse); 167 expect(a == new SourceEdit(1, 2, 'bbb'), isFalse);
170 expect(a == new SourceEdit(10, 2, 'aaa'), isFalse); 168 expect(a == new SourceEdit(10, 2, 'aaa'), isFalse);
171 } 169 }
172 170
173 void test_new() { 171 void test_new() {
174 SourceEdit edit = new SourceEdit(1, 2, 'foo', id: 'my-id'); 172 SourceEdit edit = new SourceEdit(1, 2, 'foo', id: 'my-id');
175 expect(edit.offset, 1); 173 expect(edit.offset, 1);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 334
337 void test_toJson() { 335 void test_toJson() {
338 Position position = new Position('/test.dart', 1); 336 Position position = new Position('/test.dart', 1);
339 var expectedJson = { 337 var expectedJson = {
340 FILE: '/test.dart', 338 FILE: '/test.dart',
341 OFFSET: 1 339 OFFSET: 1
342 }; 340 };
343 expect(position.toJson(), expectedJson); 341 expect(position.toJson(), expectedJson);
344 } 342 }
345 } 343 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698