From d2fbdf74493d69e73fbfaedc0d59e593dfd7c69d Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Tue, 15 May 2018 09:50:31 +0100 Subject: Add unittest for DiscretePDF --- include/klee/Internal/ADT/DiscretePDF.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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 namespace klee { template @@ -162,8 +163,7 @@ void DiscretePDF::update(T item, weight_type weight) { template T DiscretePDF::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"); -- cgit 1.4.1