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

Side by Side Diff: tests/debugger/debugger_tests.dart

Issue 2029723004: Don't quit debugger when the program terminates, only after `quit`. Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « tests/debugger/constructor_expected.txt ('k') | tests/debugger/empty_column_expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 /// Modify this file to include more tests. 5 /// Modify this file to include more tests.
6 library dartino_tests.debugger; 6 library dartino_tests.debugger;
7 7
8 import 'dart:async' show 8 import 'dart:async' show
9 Stream, 9 Stream,
10 Future; 10 Future;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 } 105 }
106 106
107 testDebugCommandStream(DartinoVmContext context) async* { 107 testDebugCommandStream(DartinoVmContext context) async* {
108 yield 't verbose'; 108 yield 't verbose';
109 yield 'b main'; 109 yield 'b main';
110 yield 'r'; 110 yield 'r';
111 while (!context.terminated) { 111 while (!context.terminated) {
112 yield 's'; 112 yield 's';
113 } 113 }
114 yield 'q';
114 }; 115 };
115 116
116 int result = await new CommandLineDebugger( 117 int result = await new CommandLineDebugger(
117 state.vmContext, 118 state.vmContext,
118 debuggerCommands.isEmpty 119 debuggerCommands.isEmpty
119 ? testDebugCommandStream(state.vmContext) 120 ? testDebugCommandStream(state.vmContext)
120 : new Stream.fromIterable(debuggerCommands), 121 : new Stream.fromIterable(debuggerCommands),
121 Uri.base, 122 Uri.base,
122 state.stdoutSink, 123 state.stdoutSink,
123 echo: true).run(state, snapshotLocation: snapshotPath); 124 echo: true).run(state, snapshotLocation: snapshotPath);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 return listTestsInternal(false); 205 return listTestsInternal(false);
205 } 206 }
206 207
207 main(List<String> args) async { 208 main(List<String> args) async {
208 args = args.map((a) => 'debugger/$a').toList(); 209 args = args.map((a) => 'debugger/$a').toList();
209 Map<String, NoArgFuture> tests = await listTestsInternal(true); 210 Map<String, NoArgFuture> tests = await listTestsInternal(true);
210 for (String name in tests.keys) { 211 for (String name in tests.keys) {
211 if (args.isEmpty || args.contains(name)) await tests[name](); 212 if (args.isEmpty || args.contains(name)) await tests[name]();
212 } 213 }
213 } 214 }
OLDNEW
« no previous file with comments | « tests/debugger/constructor_expected.txt ('k') | tests/debugger/empty_column_expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698