Add GTEST_MOVE macro, to support mocking methods with move-only return types.

Add GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
This commit is contained in:
kosak
2014-01-29 06:34:44 +00:00
parent 7d1051ce2b
commit 35956659ea
2 changed files with 28 additions and 2 deletions

View File

@@ -57,6 +57,7 @@ using ::std::ostream;
// Prints a segment of bytes in the given object.
GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start,
size_t count, ostream* os) {
char text[5] = "";
@@ -254,6 +255,7 @@ void PrintTo(wchar_t wc, ostream* os) {
// and may not be NUL-terminated.
template <typename CharType>
GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
static void PrintCharsAsStringTo(
const CharType* begin, size_t len, ostream* os) {
const char* const kQuoteBegin = sizeof(CharType) == 1 ? "\"" : "L\"";
@@ -276,6 +278,7 @@ static void PrintCharsAsStringTo(
// 'begin'. CharType must be either char or wchar_t.
template <typename CharType>
GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
static void UniversalPrintCharArray(
const CharType* begin, size_t len, ostream* os) {
// The code