# HG changeset patch # User alfadur # Date 1590005288 -10800 # Node ID db710cd8df6954f0f2970f6d39a2a1e9795b3258 # Parent 0b6094660557a2898cc04817ef07e3443d7043f2 remove stuck test diff -r 0b6094660557 -r db710cd8df69 rust/hedgewars-server/src/handlers/common.rs --- a/rust/hedgewars-server/src/handlers/common.rs Wed May 20 22:50:58 2020 +0300 +++ b/rust/hedgewars-server/src/handlers/common.rs Wed May 20 23:08:08 2020 +0300 @@ -668,21 +668,4 @@ fn test_handle_rnd_nonempty() { run_handle_test(vec!["A".to_owned(), "B".to_owned(), "C".to_owned()]) } - - /// This test terminates almost surely (strong law of large numbers) - #[test] - fn test_distribution() { - let eps = 0.000001; - let lim = 0.5; - let opts = vec![0.to_string(), 1.to_string()]; - let mut ones = 0; - let mut tries = 0; - - while tries < 1000 || ((ones as f64 / tries as f64) - lim).abs() >= eps { - tries += 1; - if reply2string(rnd_reply(&opts)) == 1.to_string() { - ones += 1; - } - } - } }