Add more snapshots from facet tests

This commit is contained in:
Loïc Lecrenier
2022-09-01 11:09:01 +02:00
committed by Loïc Lecrenier
parent 61252248fb
commit 07ff92c663
40 changed files with 840 additions and 81 deletions

View File

@ -108,15 +108,15 @@ where
#[cfg(test)]
mod tests {
use crate::milli_snap;
use crate::{
heed_codec::facet::new::ordered_f64_codec::OrderedF64Codec, search::facet::test::FacetIndex,
};
use heed::BytesDecode;
use rand::{Rng, SeedableRng};
use roaring::RoaringBitmap;
use std::ops::ControlFlow;
use crate::{
heed_codec::facet::new::ordered_f64_codec::OrderedF64Codec, search::facet::test::FacetIndex,
};
use super::iterate_over_facet_distribution;
fn get_simple_index() -> FacetIndex<OrderedF64Codec> {
@ -151,7 +151,7 @@ mod tests {
#[test]
fn random_looking_index_snap() {
let index = get_random_looking_index();
insta::assert_display_snapshot!(index)
milli_snap!(format!("{index}"));
}
#[test]
fn filter_distribution_all() {
@ -172,7 +172,7 @@ mod tests {
},
)
.unwrap();
insta::assert_snapshot!(format!("filter_distribution_{i}_all"), results);
milli_snap!(results, i);
txn.commit().unwrap();
}
@ -203,7 +203,7 @@ mod tests {
},
)
.unwrap();
insta::assert_snapshot!(format!("filter_distribution_{i}_all_stop_early"), results);
milli_snap!(results, i);
txn.commit().unwrap();
}