Bug 1260208 - part 1 - use C I/O facilities in TestWebGLElementArrayCache instead of C++ ones; r=BenWa

The libc++ included with the Android NDK does not seem to work correctly
with std::cerr; writing to it (or to std::cout, as confirmed by tests)
causes the process to hang indefinitely, causing test failures.  Using
fprintf and stderr, however, seems to work correctly.
This commit is contained in:
Nathan Froyd 2016-05-03 09:13:49 -04:00
Родитель 0574002b30
Коммит 92ffe625a9
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -8,8 +8,8 @@
#include "WebGLElementArrayCache.cpp"
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include "nscore.h"
#include "nsTArray.h"
@ -21,7 +21,7 @@ VerifyImplFunction(bool condition, const char* file, int line)
if (condition) {
gTestsPassed++;
} else {
std::cerr << "Test failed at " << file << ":" << line << std::endl;
std::fprintf(stderr, "Test failed at %s:%d\n", file, line);
abort();
}
}
@ -226,7 +226,7 @@ main(int argc, char* argv[])
} // i
} // maxBufferSize
std::cerr << argv[0] << ": all " << gTestsPassed << " tests passed" << std::endl;
std::fprintf(stderr, "%s: all %d tests passed\n", argv[0], gTestsPassed);
return 0;
}