fix(flutter): compile the Flutter tests on Windows (#5880)

The process tests that use FlutterDaemon::with_executable and ToolServer::is_stopped only run on Unix, so on Windows both helpers were dead code and the ide-flutter test build failed under -D warnings. They are now compiled only for Unix tests.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-25 18:50:59 +08:00
1 джерело 834846840b
коміт 497948eeff
2 files changed
+2 -2

No files matched your search

+1 -1
Переглянути файл
@@ -213,7 +213,7 @@ impl FlutterDaemon {
Self(Arc::new(Shared { root, sink, executable, state: Mutex::default() }))
}
#[cfg(test)]
#[cfg(all(test, unix))]
fn with_executable(root: PathBuf, sink: SharedSink, executable: Option<PathBuf>) -> Self {
Self::new(root, sink, Box::new(move || executable.clone()))
}
+1 -1
Переглянути файл
@@ -146,7 +146,7 @@ impl ToolServer {
self.0.changed.notify_all();
}
#[cfg(test)]
#[cfg(all(test, unix))]
pub(crate) fn is_stopped(&self) -> bool {
matches!(self.0.state.lock().status, Status::Stopped)
}