unit tests: don't try to close a NULL outfp_

This commit is contained in:
nick black 2019-12-12 09:08:06 -05:00
parent ca2f0471c3
commit 23f8a070b3
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
6 changed files with 18 additions and 6 deletions

View File

@ -23,7 +23,9 @@ class CellTest : public :: testing::Test {
if(nc_){
EXPECT_EQ(0, notcurses_stop(nc_));
}
fclose(outfp_);
if(outfp_){
fclose(outfp_);
}
}
struct notcurses* nc_{};

View File

@ -41,7 +41,9 @@ class FadeTest : public :: testing::Test {
if(nc_){
EXPECT_EQ(0, notcurses_stop(nc_));
}
fclose(outfp_);
if(outfp_){
fclose(outfp_);
}
}
struct notcurses* nc_{};

View File

@ -22,7 +22,9 @@ class LibavTest : public :: testing::Test {
if(nc_){
EXPECT_EQ(0, notcurses_stop(nc_));
}
fclose(outfp_);
if(outfp_){
fclose(outfp_);
}
}
notcurses* nc_{};

View File

@ -24,7 +24,9 @@ class NcplaneTest : public :: testing::Test {
if(nc_){
EXPECT_EQ(0, notcurses_stop(nc_));
}
fclose(outfp_);
if(outfp_){
fclose(outfp_);
}
}
struct notcurses* nc_{};

View File

@ -23,7 +23,9 @@ class NotcursesTest : public :: testing::Test {
if(nc_){
EXPECT_EQ(0, notcurses_stop(nc_));
}
fclose(outfp_);
if(outfp_){
fclose(outfp_);
}
}
struct notcurses* nc_{};

View File

@ -23,7 +23,9 @@ class PanelReelTest : public :: testing::Test {
if(nc_){
EXPECT_EQ(0, notcurses_stop(nc_));
}
fclose(outfp_);
if(outfp_){
fclose(outfp_);
}
}
struct notcurses* nc_{};