generic_writer_test: crash with message if tmpfile fails

This commit is contained in:
Aliaksey Kandratsenka 2024-02-07 19:34:16 -05:00
parent 7756b4cc61
commit e7f576d9f1

View File

@ -39,6 +39,10 @@ void PrintLargeAmount(GenericWriter* writer) {
void TestFile() {
#ifndef _WIN32
FILE* f = tmpfile();
if (!f) {
perror("tmpfile");
abort();
}
{
tcmalloc::RawFDGenericWriter<128> writer(static_cast<RawFD>(fileno(f)));