[ddc] Migrate more tests to null safety

Issue: https://github.com/dart-lang/sdk/issues/46617
Change-Id: I7f27810c0ca825ea777e6c6bfcade6a8ee2b06e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249065
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
diff --git a/pkg/dev_compiler/test/sdk_source_map_test.dart b/pkg/dev_compiler/test/sdk_source_map_test.dart
index 84e6038..799c1b1 100644
--- a/pkg/dev_compiler/test/sdk_source_map_test.dart
+++ b/pkg/dev_compiler/test/sdk_source_map_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// @dart = 2.9
-
 import 'dart:io';
 
 import 'package:expect/expect.dart';
diff --git a/pkg/dev_compiler/test/string_to_uri_test.dart b/pkg/dev_compiler/test/string_to_uri_test.dart
index bfd74be..9534711 100755
--- a/pkg/dev_compiler/test/string_to_uri_test.dart
+++ b/pkg/dev_compiler/test/string_to_uri_test.dart
@@ -1,11 +1,14 @@
-// @dart = 2.9
+// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
 
 import 'dart:io';
+
 import 'package:dev_compiler/src/compiler/shared_command.dart';
 import 'package:test/test.dart';
 
 void main(List<String> args) {
-  String currentDir;
+  late String currentDir;
   setUpAll(() {
     currentDir = Directory.current.path.replaceAll(r'\', r'/');
     if (!currentDir.startsWith(r'/')) currentDir = '/$currentDir';