|
OpenTTD Source 20251104-master-g3befbdd52f
|
Test functionality for misc/history_func. More...
#include "../stdafx.h"#include "../3rdparty/catch2/catch.hpp"#include "../misc/history_type.hpp"#include "../misc/history_func.hpp"#include "../safeguards.h"Go to the source code of this file.
Functions | |
| template<> | |
| uint16_t | SumHistory (std::span< const uint16_t > history) |
| template<typename T > | |
| T | GetHistory (const HistoryData< T > &history, const HistoryRange &hr, uint age) |
| Helper to get history records and return the value, instead returning its validity. | |
| TEST_CASE ("History Rotation and Reporting tests") | |
Test functionality for misc/history_func.
Definition in file history_func.cpp.
| T GetHistory | ( | const HistoryData< T > & | history, |
| const HistoryRange & | hr, | ||
| uint | age | ||
| ) |
Helper to get history records and return the value, instead returning its validity.
| history | History data to extract from. |
| hr | History range to get. |
| age | Age of data to get. |
Definition at line 34 of file history_func.cpp.
References GetHistory().
Referenced by GetHistory().
| uint16_t SumHistory | ( | std::span< const uint16_t > | history | ) |
Definition at line 20 of file history_func.cpp.
| TEST_CASE | ( | "History Rotation and Reporting tests" | ) |
Definition at line 41 of file history_func.cpp.