Commit d1531495 authored by Matt Pharr's avatar Matt Pharr

Improve temp file cleanup in tests

parent f672c9eb
......@@ -430,6 +430,8 @@ TEST_P(RenderTest, RadianceMatches) {
delete tr.integrator;
EXPECT_EQ(0, remove("test.exr"));
INSTANTIATE_TEST_CASE_P(AnalyticTestScenes, RenderTest,
......@@ -17296,20 +17296,10 @@ TEST(BSDFs, Fourier) {
// Write the serialized data to a temporary file
// TODO: improve FourierBSDFTable to also be able to deserialize from a
// given array.
char filename[L_tmpnam];
#ifdef __GNUG__
// Don't warn about tmpnam being deprecated. While it would be nice in
// principle to use mkstmp(), it's not available on Windows, while
// tmpnam is in the standard.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif // __GNUG__
#ifdef __GNUG__
#pragma GCC diagnostic pop
#endif // __GNUG__
const char *filename = "fourier.out";
FILE *f = fopen(filename, "wb");
int sz = sizeof(fourierData);
ASSERT_EQ(sz, fwrite(fourierData, 1, sz, f));
ASSERT_EQ(0, fclose(f));
......@@ -72,6 +72,9 @@ static void TestRoundTrip(const char *fn, bool gamma) {
// Clean up
EXPECT_EQ(0, remove(fn));
TEST(ImageIO, RoundTripEXR) { TestRoundTrip("out.exr", false); }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment