/
githubmirror
/
bitcoin
Обзор
Документация
Войти
/
githubmirror
/
bitcoin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/test/system_ram_tests.cpp
20 строк
554 B
Lőrinc
test: require `TryGetTotalRam()` detection
03 авг 2026, 22:04
Не верифицирован
03 авг 2026, 22:04
6a2de55
Код
Авторство
О чём код?
// Copyright (c) 2025-present The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or https://opensource.org/license/mit/. #include <common/system.h> #include <util/byte_units.h> #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(system_ram_tests) BOOST_AUTO_TEST_CASE(total_ram) { const auto total{TryGetTotalRam()}; BOOST_REQUIRE(total); BOOST_CHECK_GE(*total, 1_GiB); BOOST_CHECK_LT(*total, 10'000_GiB); // ~10 TiB memory is unlikely } BOOST_AUTO_TEST_SUITE_END()