Skip to content
This repository was archived by the owner on Jan 3, 2025. It is now read-only.

Commit ac38c75

Browse files
authored
Remove usage of deprecated dart:io constants. (#11)
1 parent 8ac121d commit ac38c75

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/test_process.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class TestProcess {
149149
// If the process is already dead, do nothing.
150150
if (await _exitCodeOrNull != null) return;
151151

152-
_process.kill(ProcessSignal.SIGKILL);
152+
_process.kill(ProcessSignal.sigkill);
153153

154154
// Log output now rather than waiting for the exitCode callback so that
155155
// it's visible even if we time out waiting for the process to die.
@@ -217,7 +217,7 @@ class TestProcess {
217217
///
218218
/// If this is called after the process is already dead, it does nothing.
219219
Future kill() async {
220-
_process.kill(ProcessSignal.SIGKILL);
220+
_process.kill(ProcessSignal.sigkill);
221221
await exitCode;
222222
}
223223

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: Dart Team <[email protected]>
55
homepage: https://github.com/dart-lang/test_process
66

77
environment:
8-
sdk: '>=2.0.0-dev.17.0 <2.0.0'
8+
sdk: '>=2.0.0-dev.55.0 <2.0.0'
99

1010
dependencies:
1111
async: ">=1.12.0 <3.0.0"

test/test_process_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ void main() {
9999

100100
test("signal sends a signal to the process", () async {
101101
var process = await startDartProcess(r'''
102-
ProcessSignal.SIGHUP.watch().listen((_) => print("HUP"));
102+
ProcessSignal.sighup.watch().listen((_) => print("HUP"));
103103
print("ready");
104104
''');
105105

106106
await expectLater(process.stdout, emits('ready'));
107-
process.signal(ProcessSignal.SIGHUP);
107+
process.signal(ProcessSignal.sighup);
108108
await expectLater(process.stdout, emits('HUP'));
109109
process.kill();
110110
}, testOn: "!windows");

0 commit comments

Comments
 (0)