From 369f4e8fffcd9e202ced3015cb179d270f1358e7 Mon Sep 17 00:00:00 2001 From: "Michael G. Noll" Date: Thu, 8 Jan 2015 16:18:42 +0100 Subject: [PATCH] GH-388: Fix CMS test issue caused by roundtripping depth->delta->depth --- .../test/scala/com/twitter/algebird/CountMinSketchTest.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/algebird-test/src/test/scala/com/twitter/algebird/CountMinSketchTest.scala b/algebird-test/src/test/scala/com/twitter/algebird/CountMinSketchTest.scala index 3736d4a66..742036839 100644 --- a/algebird-test/src/test/scala/com/twitter/algebird/CountMinSketchTest.scala +++ b/algebird-test/src/test/scala/com/twitter/algebird/CountMinSketchTest.scala @@ -572,7 +572,7 @@ class CMSFunctionsSpec extends PropSpec with PropertyChecks with Matchers { // For all i > 709 this test break because of precision limits: For all i > 709 will return 0.0, which is not the // mathematically correct value but rather the asymptote of delta. val maxI = 709 - forAll(Gen.choose(0, maxI)) { (i: Int) => + forAll((Gen.choose(1, maxI), "depth")) { (i: Int) => CMSFunctions.depth(CMSFunctions.delta(i)) should be(i) } }