Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only build OutputCapture strings when necessary
Update `OutputCapture` so that expensive build operations are only performed when necessary. This update is especially important for Kotlin users calling `"Expected String" in output` since this results in a call to Kotlin's `CharSequence.contains` which calls the `length()` and `charAt()` methods many times. Closes gh-32033
- Loading branch information
Showing
2 changed files
with
100 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters