summaryrefslogtreecommitdiff
path: root/src/unittest
diff options
context:
space:
mode:
Diffstat (limited to 'src/unittest')
-rw-r--r--src/unittest/stattest.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/unittest/stattest.cc b/src/unittest/stattest.cc
index c5e39888d..ccce2173b 100644
--- a/src/unittest/stattest.cc
+++ b/src/unittest/stattest.cc
@@ -92,6 +92,7 @@ struct StatTest
Histogram h10;
Histogram h11;
Histogram h12;
+ SparseHistogram sh1;
Formula f1;
Formula f2;
@@ -316,6 +317,12 @@ StatTest::init()
.desc("this is histogram 12")
;
+ sh1
+ .init(0)
+ .name("SparseHistogram1")
+ .desc("this is sparse histogram 1")
+ ;
+
f1
.name("Formula1")
.desc("this is formula 1")
@@ -623,4 +630,8 @@ StatTest::run()
h11.sample(i);
h12.sample(i);
}
+
+ for (int i = 0; i < 1000; i++) {
+ sh1.sample(random() % 10000);
+ }
}