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

Side by Side Diff: pkg/analysis_server/test/integration/server/set_subscriptions_invalid_service_test.dart

Issue 2710193002: Update the analysis server integration tests to always run on the analysis driver. (Closed)
Patch Set: Created 3 years, 10 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 import 'package:test/test.dart'; 5 import 'package:test/test.dart';
6 import 'package:test_reflective_loader/test_reflective_loader.dart'; 6 import 'package:test_reflective_loader/test_reflective_loader.dart';
7 7
8 import '../integration_tests.dart'; 8 import '../integration_tests.dart';
9 9
10 main() { 10 main() {
11 defineReflectiveSuite(() { 11 defineReflectiveSuite(() {
12 defineReflectiveTests(SetSubscriptionsTest); 12 defineReflectiveTests(SetSubscriptionsTest);
13 defineReflectiveTests(SetSubscriptionsTest_Driver);
14 }); 13 });
15 } 14 }
16 15
17 class AbstractSetSubscriptionsTest 16 @reflectiveTest
18 extends AbstractAnalysisServerIntegrationTest { 17 class SetSubscriptionsTest extends AbstractAnalysisServerIntegrationTest {
19 test_setSubscriptions_invalidService() { 18 test_setSubscriptions_invalidService() async {
20 // TODO(paulberry): verify that if an invalid service is specified, the 19 // TODO(paulberry): verify that if an invalid service is specified, the
21 // current subscriptions are unchanged. 20 // current subscriptions are unchanged.
22 return server.send("server.setSubscriptions", { 21 try {
23 'subscriptions': ['bogus'] 22 await server.send("server.setSubscriptions", {
24 }).then((_) { 23 'subscriptions': ['bogus']
24 });
25 fail('setSubscriptions should have produced an error'); 25 fail('setSubscriptions should have produced an error');
26 }, onError: (error) { 26 } on ServerErrorMessage catch (message) {
27 // The expected error occurred. 27 expect(message.error['code'], 'INVALID_PARAMETER');
28 }); 28 }
29 } 29 }
30 } 30 }
31
32 @reflectiveTest
33 class SetSubscriptionsTest extends AbstractSetSubscriptionsTest {}
34
35 @reflectiveTest
36 class SetSubscriptionsTest_Driver extends AbstractSetSubscriptionsTest {
37 @override
38 bool get enableNewAnalysisDriver => true;
39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698