tisonkun commented on code in PR #51:
URL: https://github.com/apache/datasketches-rust/pull/51#discussion_r2654653263


##########
datasketches/tests/frequencies_update_test.rs:
##########
@@ -479,20 +479,6 @@ fn test_longs_reset() {
     assert_eq!(sketch.lg_max_map_size(), 3);
 }
 
-#[test]
-#[should_panic(expected = "count may not be negative")]
-fn test_longs_negative_count_panics() {
-    let mut sketch: FrequentItemsSketch<i64> = FrequentItemsSketch::new(8);
-    sketch.update_with_count(1, -1);
-}
-
-#[test]
-#[should_panic(expected = "count may not be negative")]
-fn test_items_negative_count_panics() {
-    let mut sketch = FrequentItemsSketch::new(8);
-    sketch.update_with_count("a".to_string(), -1);
-}
-

Review Comment:
   Never panic by type check.



-- 
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.

To unsubscribe, e-mail: [email protected]

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