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 'package:observatory/service_io.dart'; | 6 import 'package:observatory/service_io.dart'; |
7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
8 import 'test_helper.dart'; | 8 import 'test_helper.dart'; |
9 import 'service_test_common.dart'; | 9 import 'service_test_common.dart'; |
10 import 'dart:developer'; | 10 import 'dart:developer'; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 expect(stack['frames'].length, greaterThanOrEqualTo(2)); | 56 expect(stack['frames'].length, greaterThanOrEqualTo(2)); |
57 expect(stack['frames'][0].function.name, equals('myFunction')); | 57 expect(stack['frames'][0].function.name, equals('myFunction')); |
58 expect(stack['frames'][0].function.dartOwner.name, equals('MyClass')); | 58 expect(stack['frames'][0].function.dartOwner.name, equals('MyClass')); |
59 | 59 |
60 var func = stack['frames'][0].function; | 60 var func = stack['frames'][0].function; |
61 expect(func.name, equals('myFunction')); | 61 expect(func.name, equals('myFunction')); |
62 await func.load(); | 62 await func.load(); |
63 | 63 |
64 var expectedRange = { | 64 var expectedRange = { |
65 'scriptIndex': 0, | 65 'scriptIndex': 0, |
66 'startPos': ifKernel(489, 39), | 66 'startPos': ifKernel(501, 39), |
67 'endPos': ifKernel(633, 88), | 67 'endPos': ifKernel(633, 88), |
68 'compiled': true, | 68 'compiled': true, |
69 'coverage': { | 69 'coverage': { |
70 'hits': ifKernel([539, 590, 619], [54, 72, 82]), | 70 'hits': ifKernel([539, 590, 619], [54, 72, 82]), |
71 'misses': ifKernel([552], [60]) | 71 'misses': ifKernel([552], [60]) |
72 } | 72 } |
73 }; | 73 }; |
74 | 74 |
75 // Full script | 75 // Full script |
76 var params = { 'reports' : ['Coverage'], | 76 var params = { 'reports' : ['Coverage'], |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 expect(e.message, | 153 expect(e.message, |
154 "getSourceReport: the 'endTokenPos' parameter requires the " | 154 "getSourceReport: the 'endTokenPos' parameter requires the " |
155 "\'scriptId\' parameter"); | 155 "\'scriptId\' parameter"); |
156 } | 156 } |
157 expect(caughtException, isTrue); | 157 expect(caughtException, isTrue); |
158 }, | 158 }, |
159 | 159 |
160 ]; | 160 ]; |
161 | 161 |
162 main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction); | 162 main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction); |
OLD | NEW |