mirror of https://github.com/OpenTTD/OpenTTD
Compare commits
3 Commits
aa2b051df4
...
5ee2fa64de
Author | SHA1 | Date |
---|---|---|
|
5ee2fa64de | |
|
0972d3373f | |
|
9a106c4af4 |
|
@ -46,14 +46,13 @@ T GetHistory(const HistoryData<T> &history, uint period, uint age)
|
|||
TEST_CASE("History Rotation and Reporting tests")
|
||||
{
|
||||
HistoryData<uint16_t> history{};
|
||||
ValidHistoryMask valid_history = 0;
|
||||
uint64_t valid_history = 0;
|
||||
|
||||
/* Fill the history with decreasing data points for 24 years of history. This ensures that no data period should
|
||||
* contain the same value as another period. */
|
||||
uint16_t i = 12 * HISTORY_PERIODS;
|
||||
for (uint date = 1; date <= 12 * HISTORY_PERIODS; ++date, --i) {
|
||||
history[THIS_MONTH] = i;
|
||||
UpdateValidHistory(valid_history, date % 12);
|
||||
RotateHistory(history, valid_history, date % 12);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue