GTest's output is mutex-protected, so multi-threading doesn't produce garbled output.
The function which generally does this work is AddTestPartResult
. At line 3713, you can see the lock being applied:
internal::MutexLock lock(&mutex_);
and then at 3732 the result is printed in this call:
impl_->GetTestPartResultReporterForCurrentThread()->ReportTestPartResult(result);