forked from OSchip/llvm-project
[libc++][test] Portability fix of std::strstreambuf constructor test
The standard does not require the constructor `strstreambuf(streamsize alsize_arg = 0)` leave the stream array unallocated when called with parameter `alsize_arg > 0`. Conformant implementations of this constructor may allocate minimal `alsize_arg` number of bytes forcing `str()` method to return non-null pointer. Thanks to Andrey Maksimov for the patch. Differential Revision: https://reviews.llvm.org/D72465
This commit is contained in:
parent
1dac073bdd
commit
b3445c839f
|
@ -26,7 +26,7 @@ int main(int, char**)
|
|||
}
|
||||
{
|
||||
std::strstreambuf s(1024);
|
||||
assert(s.str() == nullptr);
|
||||
LIBCPP_ASSERT(s.str() == nullptr);
|
||||
assert(s.pcount() == 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue