Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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:observatory/debugger.dart'; | 7 import 'package:observatory/debugger.dart'; |
| 8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
| 9 import 'service_test_common.dart'; | 9 import 'service_test_common.dart'; |
| 10 import 'test_helper.dart'; | 10 import 'test_helper.dart'; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 | 48 |
| 49 class DebuggerLocationTestBar { | 49 class DebuggerLocationTestBar { |
| 50 } | 50 } |
| 51 | 51 |
| 52 Future<Debugger> initDebugger(Isolate isolate) { | 52 Future<Debugger> initDebugger(Isolate isolate) { |
| 53 return isolate.getStack().then((stack) { | 53 return isolate.getStack().then((stack) { |
| 54 return new TestDebugger(isolate, stack); | 54 return new TestDebugger(isolate, stack); |
| 55 }); | 55 }); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void dummy() { | |
|
Kevin Millikin (Google)
2017/02/08 15:37:51
Do we have a plan for a better way to do this?
Cutch
2017/02/08 16:48:20
Why is this needed?
jensj
2017/02/13 14:04:15
Even though unittest.dart is included, it isn't in
jensj
2017/02/13 14:04:15
I don't know. It seems somewhat artificial to me t
| |
| 59 // Use something from unittest.dart in order to get it included in kernel. | |
| 60 formatStacks; | |
| 61 } | |
| 62 | |
| 58 var tests = [ | 63 var tests = [ |
| 59 | 64 |
| 60 hasStoppedAtBreakpoint, | 65 hasStoppedAtBreakpoint, |
| 61 | 66 |
| 62 // Parse '' => current position | 67 // Parse '' => current position |
| 63 (Isolate isolate) async { | 68 (Isolate isolate) async { |
| 64 var debugger = await initDebugger(isolate); | 69 var debugger = await initDebugger(isolate); |
| 65 var loc = await DebuggerLocation.parse(debugger, ''); | 70 var loc = await DebuggerLocation.parse(debugger, ''); |
| 66 expect(loc.valid, isTrue); | 71 expect(loc.valid, isTrue); |
| 67 expect(loc.toString(), equals('debugger_location_test.dart:$LINE_A:5')); | 72 expect(loc.toString(), equals('debugger_location_test.dart:$LINE_A:5')); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 // TODO(turnidge): Printing a constructor currently adds | 151 // TODO(turnidge): Printing a constructor currently adds |
| 147 // another class qualifier at the front. Do we want to change | 152 // another class qualifier at the front. Do we want to change |
| 148 // this to be more consistent? | 153 // this to be more consistent? |
| 149 expect(loc.toString(), equals( | 154 expect(loc.toString(), equals( |
| 150 'DebuggerLocationTestFoo.DebuggerLocationTestFoo.named')); | 155 'DebuggerLocationTestFoo.DebuggerLocationTestFoo.named')); |
| 151 }, | 156 }, |
| 152 | 157 |
| 153 ]; | 158 ]; |
| 154 | 159 |
| 155 main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction); | 160 main(args) => runIsolateTests(args, tests, testeeConcurrent: testFunction); |
| OLD | NEW |