Skip to content

Commit 42b233a

Browse files
Merge pull request #321 from google:add-whitespace-between-logged-failures
PiperOrigin-RevId: 584023985
2 parents 6b529d5 + 1858d32 commit 42b233a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

googletest/src/internal/test_outcome.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl TestAssertionFailure {
174174

175175
pub(crate) fn log(&self) {
176176
TestOutcome::fail_current_test();
177-
print!("{}", self);
177+
println!("{}", self);
178178
}
179179
}
180180

integration_tests/src/integration_tests.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,18 @@ mod tests {
137137
}
138138

139139
#[test]
140-
fn should_output_second_failure_message_on_second_assertion_failure_with_expect_that()
141-
-> Result<()> {
140+
fn should_output_both_failure_messages_when_two_expect_that_assertions_fail() -> Result<()> {
142141
let output = run_external_process_in_tests_directory("two_expect_that_failures")?;
143142

144143
verify_that!(
145144
output,
146145
contains_regex(indoc! {"
146+
Value of: value
147+
Expected: is equal to 3
148+
Actual: 2,
149+
which isn't equal to 3
150+
at .*integration_tests/src/two_expect_that_failures.rs:[0-9]+:9
151+
147152
Value of: value
148153
Expected: is equal to 4
149154
Actual: 2,

0 commit comments

Comments
 (0)