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

Side by Side Diff: pkg/analysis_server/test/integration/analysis/get_errors.dart

Issue 631553002: Change integration test notifications to use structured objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | 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.integration.analysis.get.errors; 5 library test.integration.analysis.get.errors;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 15 matching lines...) Expand all
26 test_getErrors() { 26 test_getErrors() {
27 String pathname = sourcePath('test.dart'); 27 String pathname = sourcePath('test.dart');
28 String text = r''' 28 String text = r'''
29 main() { 29 main() {
30 var x // parse error: missing ';' 30 var x // parse error: missing ';'
31 }'''; 31 }''';
32 writeFile(pathname, text); 32 writeFile(pathname, text);
33 standardAnalysisSetup(); 33 standardAnalysisSetup();
34 Future finishTest() { 34 Future finishTest() {
35 return sendAnalysisGetErrors(pathname).then((result) { 35 return sendAnalysisGetErrors(pathname).then((result) {
36 expect( 36 expect(result.errors, equals(currentAnalysisErrors[pathname]));
37 result.errors.map((error) => error.toJson()),
38 equals(currentAnalysisErrors[pathname]));
39 }); 37 });
40 } 38 }
41 if (afterAnalysis) { 39 if (afterAnalysis) {
42 return analysisFinished.then((_) => finishTest()); 40 return analysisFinished.then((_) => finishTest());
43 } else { 41 } else {
44 return finishTest(); 42 return finishTest();
45 } 43 }
46 } 44 }
47 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698