diff options
author | Martin Nowack <martin.nowack@gmail.com> | 2018-05-15 09:50:31 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2018-06-14 20:18:19 +0100 |
commit | d2fbdf74493d69e73fbfaedc0d59e593dfd7c69d (patch) | |
tree | d6deaca40d0526502b077270cff7202d31155c87 /include | |
parent | 2675168486c738d9ec60c728d6a14789cddd0d17 (diff) | |
download | klee-d2fbdf74493d69e73fbfaedc0d59e593dfd7c69d.tar.gz |
Add unittest for DiscretePDF
Diffstat (limited to 'include')
-rw-r--r-- | include/klee/Internal/ADT/DiscretePDF.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/klee/Internal/ADT/DiscretePDF.inc b/include/klee/Internal/ADT/DiscretePDF.inc index 32328c95..743a69b5 100644 --- a/include/klee/Internal/ADT/DiscretePDF.inc +++ b/include/klee/Internal/ADT/DiscretePDF.inc @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +#include <cassert> namespace klee { template <class T> @@ -162,8 +163,7 @@ void DiscretePDF<T>::update(T item, weight_type weight) { template <class T> T DiscretePDF<T>::choose(double p) { - if ((p < 0.0) || (p >= 1.0)) - assert(0 && "choose: argument(p) outside valid range"); + assert (!((p < 0.0) || (p >= 1.0)) && "choose: argument(p) outside valid range"); if (!m_root) assert(0 && "choose: choose() called on empty tree"); |