buildWinterForecast was indexing solarW[] and winterPrices[] by slot position h instead of actual UTC hour. When a forecast starts at 18:00, h=8 (02:00 AM) was getting solarW[8]=1200W, giving midnight slots a false solar bonus in RuleBasedStrategy::slotScore(). The strategy correctly chose those slots, but countSlotsInCheapestN (price-only) reported them as outside the 6 cheapest hours → test 1 failed. Fix: index both arrays by slot.start.toUTC().time().hour() so solar peaks at noon and prices reflect the real time-of-day. All 11 tests pass. Also includes the INCLUDEPATH += \$\$PWD fix in energyplugin.pri that makes relative includes work for test builds consuming the .pri. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| auto | ||
| mocks | ||
| tests.pro | ||