aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_prob_distr.c
AgeCommit message (Collapse)Author
2020-07-13Bug 31812: Change http URL's to httpsJeremyRand
2020-02-06prob_distr: use "clang-format off" to avoid wide lines for URLsNick Mathewson
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-11-07Rename probability distribution names to end with "_t".Nick Mathewson
I needed to do this by hand, since we also use these for function names, variable names, macro expansion, and a little token pasting.
2019-05-15Use new RNG and tinytest code to simplify prob_distr testsNick Mathewson
Since the reproducible RNG dumps its own seed, we don't need to do it for it. Since tinytest can tell us if the test failed, we don't need our own test_failed booleans.
2019-04-30Update test_prob_distr to use new reproducible RNG override codeNick Mathewson
2019-03-22prob-distr: Decrease false positive rate of stochastic tests.George Kadianakis
2019-01-17Better failure message on stochastic test failuretor-0.4.0.1-alphaNick Mathewson
2019-01-17Speed up the deterministic prng in test_prob_distr, by a lot.Nick Mathewson
Using a single xof object and squeezing it repeatedly should make everything MUCH faster here.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-11Add some more type checking.Taylor R Campbell
NOTE: This commit breaks the build, because there was a mistake in an earlier change of exactly the sort that this is meant to detect! I'm leaving it broken for illustration.
2019-01-11Use the distribution abstraction as an abstraction.Taylor R Campbell
2019-01-11Move ceil call back into the geometric sampler.Taylor R Campbell
Test exactly what the geometric sampler returns, because that's what the downstream callers of it are going to use. While here, also assert that the geometric sampler returns a positive integer. (Our geometric distribution is the one suported on {1, 2, 3, ...} that returns the number of trials before the first success, not the one supported on {0, 1, 2, ...} that returns the number of failures before the first success.)
2019-01-10Rename crypto_rand_uint32() -> crypto_rand_u32()George Kadianakis
See https://github.com/torproject/tor/pull/624#discussion_r246453777
2019-01-02Implement and test probability distributions used by WTF-PAD.George Kadianakis
This project introduces the prob_distr.c subsystem which implements all the probability distributions that WTF-PAD needs. It also adds unittests for all of them. Code and tests courtesy of Riastradh. Co-authored-by: Taylor R Campbell <campbell+tor@mumble.net> Co-authored-by: Mike Perry <mikeperry-git@torproject.org>