leerho commented on a change in pull request #319:
URL: 
https://github.com/apache/incubator-datasketches-java/pull/319#discussion_r433402959



##########
File path: 
src/test/java/org/apache/datasketches/tuple/adouble/AdoubleAnotBTest.java
##########
@@ -0,0 +1,247 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.datasketches.tuple.adouble;
+
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
+import org.apache.datasketches.theta.UpdateSketch;
+import org.apache.datasketches.theta.UpdateSketchBuilder;
+import org.apache.datasketches.tuple.AnotB;
+import org.apache.datasketches.tuple.CompactSketch;
+import org.apache.datasketches.tuple.Sketch;
+import org.apache.datasketches.tuple.SketchIterator;
+import org.apache.datasketches.tuple.UpdatableSketch;
+import org.apache.datasketches.tuple.UpdatableSketchBuilder;
+import org.apache.datasketches.tuple.adouble.DoubleSummary.Mode;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @author Lee Rhodes
+ */
+@SuppressWarnings("javadoc")
+public class AdoubleAnotBTest {
+  private final DoubleSummary.Mode mode = Mode.Sum;
+  private final Results results = new Results();
+
+  private static void threeMethodsWithTheta(
+      final AnotB<DoubleSummary> aNotB,
+      final Sketch<DoubleSummary> sketchA,
+      final Sketch<DoubleSummary> sketchB,
+      final org.apache.datasketches.theta.Sketch skThetaB,
+      final Results results) {
+    //deprecated
+    aNotB.update(sketchA, sketchB);
+    CompactSketch<DoubleSummary> result = aNotB.getResult();
+    results.check(result);
+    //Stateless
+    result = AnotB.aNotB(sketchA, sketchB);
+    results.check(result);
+    result = AnotB.aNotB(sketchA, skThetaB);
+    //Stateful w B = Tuple
+    aNotB.setA(sketchA);
+    aNotB.notB(sketchB);
+    result = aNotB.getResult(true);
+    results.check(result);
+    //Stateful w B = Theta
+    aNotB.setA(sketchA);
+    aNotB.notB(skThetaB);
+    result = aNotB.getResult(false);
+    results.check(result);
+    result = aNotB.getResult(true);
+    results.check(result);
+  }
+
+  private static class Results {
+    private int retEnt = 0;
+    private boolean empty = true;
+    private double expect = 0.0;
+    private double toll = 0.0;

Review comment:
       Yes. You can see that it is used in the _TestNG 
Assert.assertEquals(double, double double)_ call where the 3rd argument is an 
error tolerance on the comparison.  But my abbreviation is misspelled!  It 
should be _tol_!




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to