OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 // VMOptions=--error_on_bad_type --error_on_bad_override | 4 // VMOptions=--error_on_bad_type --error_on_bad_override |
5 | 5 |
6 import 'test_helper.dart'; | 6 import 'test_helper.dart'; |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:developer'; | 8 import 'dart:developer'; |
9 import 'dart:isolate' as I; | 9 import 'dart:isolate' as I; |
10 import 'dart:io'; | 10 import 'dart:io'; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 // Invoke test in v1. | 61 // Invoke test in v1. |
62 String v1 = await invokeTest(slaveIsolate); | 62 String v1 = await invokeTest(slaveIsolate); |
63 expect(v1, 'apple'); | 63 expect(v1, 'apple'); |
64 | 64 |
65 // Reload to v2. | 65 // Reload to v2. |
66 var response = await slaveIsolate.reloadSources( | 66 var response = await slaveIsolate.reloadSources( |
67 rootLibUri: v2Uri.toString(), | 67 rootLibUri: v2Uri.toString(), |
68 packagesUri: v2PackagesUri.toString(), | 68 packagesUri: v2PackagesUri.toString(), |
69 ); | 69 ); |
| 70 print(response); |
70 expect(response['success'], isTrue); | 71 expect(response['success'], isTrue); |
71 | 72 |
72 // Invoke test in v2. | 73 // Invoke test in v2. |
73 String v2 = await invokeTest(slaveIsolate); | 74 String v2 = await invokeTest(slaveIsolate); |
74 expect(v2, 'fooLib'); | 75 expect(v2, 'fooLib'); |
75 | 76 |
76 // Reload to v3. | 77 // Reload to v3. |
77 response = await slaveIsolate.reloadSources( | 78 response = await slaveIsolate.reloadSources( |
78 rootLibUri: v3Uri.toString(), | 79 rootLibUri: v3Uri.toString(), |
79 ); | 80 ); |
80 expect(response['success'], isTrue); | 81 expect(response['success'], isTrue); |
81 | 82 |
82 // Invoke test in v3. | 83 // Invoke test in v3. |
83 String v3 = await invokeTest(slaveIsolate); | 84 String v3 = await invokeTest(slaveIsolate); |
84 expect(v3, 'cabbage'); | 85 expect(v3, 'cabbage'); |
85 } | 86 } |
86 ]; | 87 ]; |
87 | 88 |
88 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); | 89 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); |
OLD | NEW |