30 ASSERT_EQ(
typeid(plugin).name(),
typeid(testobj).name());
45 ASSERT_EQ(statobj->numValues(), 0);
50 for(
int i=0; i<5; ++i)
53 ASSERT_EQ(statobj->numValues(), i+1);
59 for(
auto iter=randnums.begin(); iter!=randnums.end(); ++iter)
62 ASSERT_DOUBLE_EQ(std::accumulate(randnums.begin(), randnums.end(), init)/100.0, statobj->mean());
69 double mean = std::accumulate(randnums.begin(), randnums.end(), init)/100.0;
70 for(
auto iter=randnums.begin(); iter!=randnums.end(); ++iter)
73 squares += pow(*iter - mean, 2);
75 ASSERT_DOUBLE_EQ(squares/(100.0), statobj->var());
82 double mean = std::accumulate(randnums.begin(), randnums.end(), init)/100.0;
83 for(
auto iter=randnums.begin(); iter!=randnums.end(); ++iter)
86 squares += pow(*iter - mean, 2);
88 ASSERT_DOUBLE_EQ(sqrt(squares/100.0), statobj->std());
93 for(
auto iter=randnums.begin(); iter!=randnums.end(); ++iter)
97 ASSERT_EQ(100, statobj->numValues());
99 ASSERT_EQ(0, statobj->numValues());
107 ASSERT_EQ(
typeid(plugin).name(),
typeid(testobj).name());
122 ASSERT_EQ(
typeid(plugin).name(),
typeid(testobj).name());
131 ASSERT_EQ(
typeid(plugin).name(),
typeid(testobj).name());
140 ASSERT_EQ(
typeid(plugin).name(),
typeid(testobj).name());
149 ASSERT_EQ(
typeid(plugin).name(),
typeid(testobj).name());
158 ASSERT_EQ(
typeid(plugin).name(),
typeid(testobj).name());
167 ASSERT_EQ(
typeid(plugin).name(),
typeid(testobj).name());