🚨 fix warning
This commit is contained in:
parent
86168f9c2c
commit
0841d58ab6
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cstdio> // fopen, fclose, FILE
|
#include <cstdio> // fopen, fclose, FILE
|
||||||
|
#include <memory> // unique_ptr
|
||||||
#include <test_data.hpp>
|
#include <test_data.hpp>
|
||||||
#include <doctest.h>
|
#include <doctest.h>
|
||||||
|
|
||||||
@ -9,12 +10,11 @@ namespace utils
|
|||||||
|
|
||||||
inline bool check_testsuite_downloaded()
|
inline bool check_testsuite_downloaded()
|
||||||
{
|
{
|
||||||
std::FILE* file = std::fopen(TEST_DATA_DIRECTORY "/README.md", "r");
|
std::unique_ptr<std::FILE, decltype(&std::fclose)> file(std::fopen(TEST_DATA_DIRECTORY "/README.md", "r"), &std::fclose);
|
||||||
if (!file)
|
if (file)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::fclose(file);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user