示例#1
0
TEST(StatisticsTest, Single)
{
  TimeSeries<double> timeseries;

  timeseries.set(0);

  EXPECT_NONE(Statistics<double>::from(timeseries));
}
示例#2
0
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);
}