started stats on fields.

This commit is contained in:
didier.amyot committed 2014-05-20 09:13:24 -04:00
1 parent 2add8284e6
commit 37209f6779
11 files changed
+122 -11

No files matched your search

+17
View File
@@ -33,3 +33,20 @@ func TestAddStatsBasic(t *testing.T) {
}
}
func TestGetFinalStats(t *testing.T) {
s := NewStatAggregator()
s.sumOfTheSquares = 5000
s.sum = 200
s.n = 10
stats := s.getFinalStats()
if stats.Mean != 20. {
t.Fail()
}
if stats.Var != 100. {
t.Fail()
}
if stats.Std != 10. {
t.Fail()
}
}