Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
kampersanda committed Sep 16, 2024
1 parent 224333e commit 7abd03e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/relevance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,20 @@ impl<K, T> RelevanceStoreBuilder<K, T> {

#[cfg(test)]
mod tests {
use std::collections::HashMap;
use std::collections::HashSet;

use super::*;

#[test]
fn test_relevance_store_from_into_map() {
let map1: HashMap<char, HashMap<char, u32>> =
[('a', [('x', 1), ('y', 2)].into()), ('b', [('x', 1)].into())].into();
let store = RelevanceStore::from_map(map1.clone());
let map2 = store.into_map();
assert_eq!(map1, map2);
}

#[test]
fn test_relevance_store_name() {
let store = RelevanceStore::from_map([('a', [('x', 1)].into())].into());
Expand Down

0 comments on commit 7abd03e

Please sign in to comment.