Skip to content

Commit 558abc1

Browse files
authored
Migrate some test fixtures in DWDS to null-safety (#1679)
1 parent cd2204a commit 558abc1

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

dwds/test/fixtures/debugger_data.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// @dart = 2.9
6-
75
/// Contains hard-coded test data usable for tests.
86
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';
97

dwds/test/fixtures/logging.dart

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// @dart = 2.9
6-
75
import 'dart:async';
86

97
import 'package:logging/logging.dart';
108
import 'package:test/test.dart';
119

1210
typedef LogWriter = void Function(Level level, String message,
13-
{String error, String loggerName, String stackTrace});
11+
{String? error, String? loggerName, String? stackTrace});
1412

15-
StreamSubscription<LogRecord> _loggerSub;
13+
StreamSubscription<LogRecord>? _loggerSub;
1614

1715
/// Redirect the logs for the current zone to emit on failure.
1816
///
@@ -49,7 +47,7 @@ void setCurrentLogWriter({bool debug = false}) =>
4947
///
5048
/// Tests and groups of tests can use this to configure individual
5149
/// log writers on setup.
52-
void configureLogWriter({LogWriter customLogWriter}) {
50+
void configureLogWriter({LogWriter? customLogWriter}) {
5351
_logWriter = customLogWriter ?? _logWriter;
5452
Logger.root.level = Level.ALL;
5553
_loggerSub?.cancel();
@@ -69,7 +67,7 @@ void stopLogWriter() {
6967
LogWriter _logWriter = createLogWriter();
7068

7169
LogWriter createLogWriter({bool debug = false}) =>
72-
(level, message, {String error, String loggerName, String stackTrace}) {
70+
(level, message, {String? error, String? loggerName, String? stackTrace}) {
7371
final printFn = debug ? print : printOnFailure;
7472
final errorMessage = error == null ? '' : ':\n$error';
7573
final stackMessage = stackTrace == null ? '' : ':\n$stackTrace';

dwds/test/fixtures/utilities.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// @dart = 2.9
6-
75
import 'dart:io';
86

97
import 'package:build_daemon/client.dart';

0 commit comments

Comments
 (0)