[analyzer] Fix file paths in const tests.

Change-Id: I4b3ae8a5aad0b019640c46205364857942db2d92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
diff --git a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
index 001170c..071c51e 100644
--- a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
@@ -3465,10 +3465,10 @@
         124,
         10,
         contextMessages: [
-          ExpectedContextMessage('/home/test/lib/test.dart', 84, 1,
+          ExpectedContextMessage(testFile.path, 84, 1,
               text:
                   "The evaluated constructor 'A' is called by 'B' and 'B' is defined here."),
-          ExpectedContextMessage('/home/test/lib/test.dart', 31, 14,
+          ExpectedContextMessage(testFile.path, 31, 14,
               text:
                   "The exception is 'The assertion in this constant expression failed.' and occurs here."),
         ],
@@ -3513,10 +3513,10 @@
         101,
         9,
         contextMessages: [
-          ExpectedContextMessage('/home/test/lib/test.dart', 74, 1,
+          ExpectedContextMessage(testFile.path, 74, 1,
               text:
                   "The evaluated constructor 'A' is called by 'B' and 'B' is defined here."),
-          ExpectedContextMessage('/home/test/lib/test.dart', 23, 19,
+          ExpectedContextMessage(testFile.path, 23, 19,
               text:
                   "The exception is 'The assertion in this constant expression failed.' and occurs here."),
         ],
diff --git a/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart b/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
index 9d323df..de6a53a 100644
--- a/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
@@ -126,10 +126,10 @@
         124,
         10,
         contextMessages: [
-          ExpectedContextMessage('/home/test/lib/test.dart', 84, 1,
+          ExpectedContextMessage(testFile.path, 84, 1,
               text:
                   "The evaluated constructor 'A' is called by 'B' and 'B' is defined here."),
-          ExpectedContextMessage('/home/test/lib/test.dart', 31, 14,
+          ExpectedContextMessage(testFile.path, 31, 14,
               text:
                   "The exception is 'The assertion in this constant expression failed.' and occurs here."),
         ],