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

Unified Diff: pkg/analysis_server/test/integration/analysis_error_inttest.dart

Issue 398693002: Start writing integration tests for the analysis server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/integration/integration_tests.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/integration/analysis_error_inttest.dart
diff --git a/pkg/analysis_server/test/integration/analysis_error_inttest.dart b/pkg/analysis_server/test/integration/analysis_error_inttest.dart
new file mode 100644
index 0000000000000000000000000000000000000000..05d3416f590425e046141898b9f56fc43b0e62c3
--- /dev/null
+++ b/pkg/analysis_server/test/integration/analysis_error_inttest.dart
@@ -0,0 +1,35 @@
+// 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.integration.analysis.error;
+
+import 'package:analysis_testing/reflective_tests.dart';
+import 'package:unittest/unittest.dart';
+
+import 'integration_tests.dart';
+
+@ReflectiveTestCase()
+class AnalysisErrorIntegrationTest extends AbstractAnalysisServerIntegrationTest
+ {
+ test_detect_simple_error() {
+ createFile('test.dart',
+ '''
+main() {
+ var x // parse error: missing ';'
+}''');
+ setAnalysisRoots(['']);
+ return analysisFinished.then((_) {
+ String filePath = normalizePath('test.dart');
+ expect(currentAnalysisErrors[filePath], isList);
+ List errors = currentAnalysisErrors[filePath];
+ expect(errors, hasLength(1));
+ expect(errors[0], isAnalysisError);
+ expect(errors[0]['location']['file'], equals(filePath));
Brian Wilkerson 2014/07/16 14:08:51 Consider adding specialized matcher builders, such
Paul Berry 2014/07/16 16:00:00 Good idea. I will do this in a future CL.
+ });
+ }
+}
+
+main() {
+ runReflectiveTests(AnalysisErrorIntegrationTest);
+}
« no previous file with comments | « no previous file | pkg/analysis_server/test/integration/integration_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698