[flang-commits] [flang] [Flang] Fix a test case that depends on stderr output of nullptr. (PR #73349)

Daniel Chen via flang-commits flang-commits at lists.llvm.org
Fri Nov 24 13:18:30 PST 2023


https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/73349

>From cb9bace01ec2b940ee12388163cfc58f6b7b2206 Mon Sep 17 00:00:00 2001
From: cdchen-ca <cdchen at ca.ibm.com>
Date: Fri, 24 Nov 2023 11:38:45 -0500
Subject: [PATCH] [Flang] Fix a test case that depends on stderr output of
 nullptr.

---
 flang/unittests/Runtime/RuntimeCrashTest.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flang/unittests/Runtime/RuntimeCrashTest.cpp b/flang/unittests/Runtime/RuntimeCrashTest.cpp
index 34a8ff6d371131f..0f25cc0ee8035ba 100644
--- a/flang/unittests/Runtime/RuntimeCrashTest.cpp
+++ b/flang/unittests/Runtime/RuntimeCrashTest.cpp
@@ -43,9 +43,9 @@ TEST(TestTerminator, CheckFailedLocationTest) {
 }
 
 TEST(TestTerminator, CheckFailedTest) {
-  static Fortran::runtime::Terminator t;
+  static Fortran::runtime::Terminator t("someFileName");
   ASSERT_DEATH(t.CheckFailed("predicate"),
-      "RUNTIME_CHECK\\(predicate\\) failed at \\(null\\)\\(0\\)");
+      "RUNTIME_CHECK\\(predicate\\) failed at someFileName\\(0\\)");
 }
 
 //------------------------------------------------------------------------------



More information about the flang-commits mailing list