tisonkun commented on code in PR #128:
URL: https://github.com/apache/datasketches-rust/pull/128#discussion_r3241541461
##########
datasketches/tests/hll_serialization_test.rs:
##########
@@ -132,6 +133,61 @@ fn test_update_after_deserialize_list_mode() {
}
}
+#[test]
+fn test_serialized_bytes_match_reference_files_for_coupon_modes() {
+ fn serialized_mode_name(bytes: &[u8]) -> &'static str {
+ // The HLL preamble stores current mode in the low two bits of byte 7.
+ match bytes[7] & 0x3 {
+ 0 => "List",
+ 1 => "Set",
+ 2 => "HLL",
+ _ => "unknown",
+ }
+ }
+
+ for (hll_type, type_name) in [
+ (HllType::Hll4, "hll4"),
+ (HllType::Hll6, "hll6"),
+ (HllType::Hll8, "hll8"),
+ ] {
Review Comment:
Oops. That's it.
--
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]