From 8cf2161845fd5e6760b5b98320dbafdd915b2051 Mon Sep 17 00:00:00 2001 From: Nate Biggs Date: Wed, 24 Jul 2024 23:22:29 -0400 Subject: [PATCH] Modify stepping integration test to accommodate new DDC async semantics. (#152204) Updates the expected steps in the async function defined within `stepping_project.dart`. The Dart web team is updating the async semantics of DDC to bring them in line with the other backends. Currently, the DDC async semantics don't adhere to the Dart spec and this can lead to inconsistent and surprising results. However, the step-over operation doesn't work well yet with the new DDC async semantics. In the long run we intend to improve this but until then the debug stepper will have sporadic results that we can't model well with this test. When we are able to fix the stepper functionality, we will return this test to cover more of the async function being stepped over. --- .../integration.shard/test_data/stepping_project.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/flutter_tools/test/integration.shard/test_data/stepping_project.dart b/packages/flutter_tools/test/integration.shard/test_data/stepping_project.dart index 9eb8e1325f..9b92b10e4b 100644 --- a/packages/flutter_tools/test/integration.shard/test_data/stepping_project.dart +++ b/packages/flutter_tools/test/integration.shard/test_data/stepping_project.dart @@ -94,10 +94,10 @@ class WebSteppingProject extends Project { Future doAsyncStuff() async { print("test"); // BREAKPOINT await Future.value(true); // STEP 1 - await Future.microtask(() => true); // STEP 2 - await Future.delayed(const Duration(milliseconds: 1)); // STEP 3 - print("done!"); // STEP 4 - } // STEP 5 + await Future.microtask(() => true); + await Future.delayed(const Duration(milliseconds: 1)); + print("done!"); + } @override Widget build(BuildContext context) { @@ -113,5 +113,5 @@ class WebSteppingProject extends Project { int get breakpointLine => lineContaining(main, '// BREAKPOINT'); int lineForStep(int i) => lineContaining(main, '// STEP $i'); - final int numberOfSteps = 5; + final int numberOfSteps = 1; }