test-utillity: Remove test-utility wrapper for Buffer::toString(). #3736
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Joshua Marantz jmarantz@google.com
Description: Follow-up to #3629 to eliminate intermediate test-util API bufferToString() and change all the call-sites to call buffer->toString() directly.
Due to Buffer::OwnedImpl's implicit constructor from Buffer:Instance,
it worked for TestUtility::bufferToString to take a const Buffer::OwnedImpl&
argument, even though many of its call-sites only
had the interface, Buffer::Instance&. In the context of the call to a static method
with a known argument type, the implict ctor is applied by the compiler to do the
type conversion.
However that doesn't work when simplify dereferencing a Buffer::Instance and
calling toString() on it. The simplest approach to resolution is to add
Buffer::Instance::toString(). IMO this is defensible: it's nice to have a simple
read-only observer for this abstract type.
Risk Level: Low
Testing: //test/...
Docs Changes: N/A
Release Notes: N/A