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

Unified Diff: runtime/observatory/tests/service/rewind_test.dart

Issue 2751423005: Run dartfmt on all files under runtime. (Closed)
Patch Set: Run dartfmt on all files under runtime. Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/tests/service/rewind_test.dart
diff --git a/runtime/observatory/tests/service/rewind_test.dart b/runtime/observatory/tests/service/rewind_test.dart
index 152d711d40d98fff3f38ce7b702ed05a0254ec73..a9563ebf1abd4c1db257e86e832a1aad14517169 100644
--- a/runtime/observatory/tests/service/rewind_test.dart
+++ b/runtime/observatory/tests/service/rewind_test.dart
@@ -32,54 +32,51 @@ b3(x) {
if (global >= 100) {
debugger();
}
- global = global + 1; // Line A
+ global = global + 1; // Line A
return sum;
}
@alwaysInline
-b2(x) => b3(x); // Line B
+b2(x) => b3(x); // Line B
@alwaysInline
-b1(x) => b2(x); // Line C
+b1(x) => b2(x); // Line C
test() {
while (true) {
- b1(10000); // Line D
+ b1(10000); // Line D
}
}
var tests = [
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_A),
-
(Isolate isolate) async {
// We are not able to rewind frame 0.
bool caughtException;
try {
await isolate.rewind(0);
- expect(false, isTrue, reason:'Unreachable');
- } on ServerRpcException catch(e) {
+ expect(false, isTrue, reason: 'Unreachable');
+ } on ServerRpcException catch (e) {
caughtException = true;
expect(e.code, equals(ServerRpcException.kCannotResume));
expect(e.message, 'Frame must be in bounds [1..9]: saw 0');
}
expect(caughtException, isTrue);
},
-
(Isolate isolate) async {
// We are not able to rewind frame 10.
bool caughtException;
try {
await isolate.rewind(10);
- expect(false, isTrue, reason:'Unreachable');
- } on ServerRpcException catch(e) {
+ expect(false, isTrue, reason: 'Unreachable');
+ } on ServerRpcException catch (e) {
caughtException = true;
expect(e.code, equals(ServerRpcException.kCannotResume));
expect(e.message, 'Frame must be in bounds [1..9]: saw 10');
}
expect(caughtException, isTrue);
},
-
(Isolate isolate) async {
// We are at our breakpoint with global=100.
var result = await isolate.rootLibrary.evaluate('global');
@@ -91,18 +88,14 @@ var tests = [
result = await isolate.rewind(1);
expect(result['type'], equals('Success'));
},
-
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_B),
-
(Isolate isolate) async {
var result = await isolate.resume();
expect(result['type'], equals('Success'));
},
-
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_A),
-
(Isolate isolate) async {
// global still is equal to 100. We did not execute "global++".
var result = await isolate.rootLibrary.evaluate('global');
@@ -114,10 +107,8 @@ var tests = [
result = await isolate.resume();
expect(result['type'], equals('Success'));
},
-
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_A),
-
(Isolate isolate) async {
// global is now 101.
var result = await isolate.rootLibrary.evaluate('global');
@@ -129,10 +120,8 @@ var tests = [
result = await isolate.rewind(3);
expect(result['type'], equals('Success'));
},
-
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_D),
-
(Isolate isolate) async {
// Reset global to 0 and start again.
var result = await isolate.rootLibrary.evaluate('global=0');
@@ -143,10 +132,8 @@ var tests = [
result = await isolate.resume();
expect(result['type'], equals('Success'));
},
-
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_A),
-
(Isolate isolate) async {
// We are at our breakpoint with global=100.
var result = await isolate.rootLibrary.evaluate('global');
@@ -158,16 +145,14 @@ var tests = [
result = await isolate.rewind(2);
expect(result['type'], equals('Success'));
},
-
hasStoppedAtBreakpoint,
stoppedAtLine(LINE_C),
];
-
-main(args) => runIsolateTests(args, tests, testeeConcurrent: test,
- extraArgs:
- ['--trace-rewind',
- '--no-prune-dead-locals',
- '--enable-inlining-annotations',
- '--no-background-compilation',
- '--optimization-counter-threshold=10']);
+main(args) => runIsolateTests(args, tests, testeeConcurrent: test, extraArgs: [
+ '--trace-rewind',
+ '--no-prune-dead-locals',
+ '--enable-inlining-annotations',
+ '--no-background-compilation',
+ '--optimization-counter-threshold=10'
+ ]);

Powered by Google App Engine
This is Rietveld 408576698