/
githubmirror
/
json
Обзор
Документация
Войти
/
githubmirror
/
json
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
tests/src/make_test_data_available.hpp
31 строка
1 KB
Niels Lohmann
:page_facing_up: adjust year (#5044)
01 янв 2026, 22:00
Не верифицирован
01 янв 2026, 22:00
515d994
Код
Авторство
О чём код?
// __ _____ _____ _____ // __| | __| | | | JSON for Modern C++ (supporting code) // | | |__ | | | | | | version 3.12.0 // |_____|_____|_____|_|___| https://github.com/nlohmann/json // // SPDX-FileCopyrightText: 2013-2026 Niels Lohmann <https://nlohmann.me> // SPDX-License-Identifier: MIT #pragma once #include <cstdio> // fopen, fclose, FILE #include <memory> // unique_ptr #include <test_data.hpp> #include <doctest.h> namespace utils { inline bool check_testsuite_downloaded() { using FilePtr = std::unique_ptr<FILE, int(*)(FILE*)>; const FilePtr file(std::fopen(TEST_DATA_DIRECTORY "/README.md", "r"), std::fclose); return file != nullptr; } TEST_CASE("check test suite is downloaded") { REQUIRE_MESSAGE(utils::check_testsuite_downloaded(), "Test data not found in '" TEST_DATA_DIRECTORY "'. Please execute target 'download_test_data' before running this test suite. See <https://github.com/nlohmann/json#execute-unit-tests> for more information."); } } // namespace utils