HomePhabricator

[libc++][test] Portability fix of std::strstreambuf constructor test

Authored by ldionne on Sep 14 2020, 2:05 PM.

Description

[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