Skip to content

Commit 9f5ccdf

Browse files
allightcopybara-github
authored andcommitted
Make XLS_ASSERT_OK{,_AND_ASSIGN} failures include source locations if available.
PiperOrigin-RevId: 810160546
1 parent 126a2d0 commit 9f5ccdf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

xls/common/status/matchers.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ void AddFatalFailure(std::string_view expression,
6868
const xabsl::StatusBuilder& builder) {
6969
GTEST_MESSAGE_AT_(
7070
builder.source_location().file_name(), builder.source_location().line(),
71-
::absl::StrCat(expression,
72-
" returned error: ", absl::Status(builder).ToString())
71+
::absl::StrCat(expression, " returned error: ",
72+
absl::Status(builder).ToString(
73+
absl::StatusToStringMode::kWithEverything))
7374
.c_str(),
7475
::testing::TestPartResult::kFatalFailure);
7576
}

0 commit comments

Comments
 (0)