TEST(StatisticsTest, Single) { TimeSeries<double> timeseries; timeseries.set(0); EXPECT_NONE(Statistics<double>::from(timeseries)); }
TEST(TimeSeriesTest, Set) { TimeSeries<int> series; ASSERT_TRUE(series.empty()); series.set(1); ASSERT_FALSE(series.empty()); const Option<TimeSeries<int>::Value> latest = series.latest(); ASSERT_SOME(latest); ASSERT_EQ(1, latest.get().data); }