diff options
author | Morgan Deters <mdeters@gmail.com> | 2011-02-28 06:06:25 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2011-02-28 06:06:25 +0000 |
commit | 9e2a8db966072b5264e829ba1cd682eef7f58d62 (patch) | |
tree | 89ffd0a61e71fc11ec5e27b01b7e7d539aa0f75e /test | |
parent | ec834d513b8d390682a08f2ea2d159c3e35a4a2d (diff) |
Review of statistics code. Added lots of documentation, and fixed an issue (I think) that Tim found with TimerStat involving wild, sometimes negative, timer statistic values. (It was due to improper initialization.)
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/util/stats_black.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/unit/util/stats_black.h b/test/unit/util/stats_black.h index 032efc37a..e44a016e6 100644 --- a/test/unit/util/stats_black.h +++ b/test/unit/util/stats_black.h @@ -95,9 +95,10 @@ public: TS_ASSERT_EQUALS(sstr.str(), "0.00000000"); sTimer.start(); - TS_ASSERT_EQUALS(timespec(), sTimer.getData()); + timespec zero = { 0, 0 }; + TS_ASSERT_EQUALS(zero, sTimer.getData()); sTimer.stop(); - TS_ASSERT_LESS_THAN(timespec(), sTimer.getData()); + TS_ASSERT_LESS_THAN(zero, sTimer.getData()); } }; |