From ff86073288ce407e25710af8d0c9cad4ae80bacf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 9 Mar 2023 13:32:27 +0100 Subject: [PATCH] Add a snapshot for the NULL facet database --- milli/src/snapshot_tests.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/milli/src/snapshot_tests.rs b/milli/src/snapshot_tests.rs index f7f1a97e6..c6ea8f3dd 100644 --- a/milli/src/snapshot_tests.rs +++ b/milli/src/snapshot_tests.rs @@ -271,6 +271,11 @@ pub fn snap_facet_id_exists_docids(index: &Index) -> String { &format!("{facet_id:<3} {}", display_bitmap(&docids)) }) } +pub fn snap_facet_id_is_null_docids(index: &Index) -> String { + make_db_snap_from_iter!(index, facet_id_is_null_docids, |(facet_id, docids)| { + &format!("{facet_id:<3} {}", display_bitmap(&docids)) + }) +} pub fn snap_facet_id_string_docids(index: &Index) -> String { make_db_snap_from_iter!(index, facet_id_string_docids, |( FacetGroupKey { field_id, level, left_bound }, @@ -495,6 +500,9 @@ macro_rules! full_snap_of_db { ($index:ident, facet_id_exists_docids) => {{ $crate::snapshot_tests::snap_facet_id_exists_docids(&$index) }}; + ($index:ident, facet_id_is_null_docids) => {{ + $crate::snapshot_tests::snap_facet_id_is_null_docids(&$index) + }}; ($index:ident, documents_ids) => {{ $crate::snapshot_tests::snap_documents_ids(&$index) }};