Fixes for analyzer/ tests on Windows.

Change-Id: If27bdffc7dfd7eeeb3e753e9213a17a97f77918a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203829
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart
index 621c1a4..300536e 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_caching_test.dart
@@ -273,9 +273,10 @@
   /// But this method is used to check returning errors from the cache, or
   /// recomputing when the cache key is expected to be different.
   Future<List<AnalysisError>> _computeTestFileErrors() async {
-    var errorsResult = await contextFor(testFilePath)
+    var testFilePathConverted = convertPath(testFilePath);
+    var errorsResult = await contextFor(testFilePathConverted)
         .currentSession
-        .getErrors2(testFilePath) as ErrorsResult;
+        .getErrors2(testFilePathConverted) as ErrorsResult;
     return errorsResult.errors;
   }
 }
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index a39f082..4edf45d 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -77,7 +77,7 @@
     expect(classA.getField(fieldName), same(field));
     expect(field.isEnumConstant, false);
     // no such field
-    expect(classA.getField("noSuchField"), same(null));
+    expect(classA.getField("noSuchField"), isNull);
   }
 
   void test_getMethod_declared() {