From 736a2db89289326bf66f691187e541fb4316edee Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Mon, 8 Aug 2022 14:26:43 +0200 Subject: [PATCH] cleanup warning in test suite --- tests/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/main.rs b/tests/main.rs index bd6c223..78becf1 100644 --- a/tests/main.rs +++ b/tests/main.rs @@ -1093,7 +1093,7 @@ fn test0902_find_all_match_context_rules_bonus() { model.build(); - model.add_contextrule("I; think", 1.1, vec!("testtag"), vec!()); //bonus! + model.add_contextrule("I; think", 1.1, vec!("testtag"), vec!()).expect("Adding context rule"); //bonus! // ^-- tag the whole entity with 'testtag' let mut params = get_test_searchparams(); @@ -1129,7 +1129,7 @@ fn test0903_find_all_match_context_rules_penalty() { model.add_to_vocabulary("right",Some(2),&VocabParams::default()); model.build(); - model.add_contextrule("I; think", 0.9, vec!(), vec!()); //penalty! + model.add_contextrule("I; think", 0.9, vec!(), vec!()).expect("Adding context rule"); //penalty! let mut params = get_test_searchparams(); params.lm_weight = 0.0; //disable normal language model @@ -1161,10 +1161,10 @@ fn test0904_find_all_match_context_rules2() { model.build(); - model.add_contextrule("think", 1.0, vec!("testtag"), vec!()); //bonus! - model.add_contextrule("are", 1.0, vec!("testtag"), vec!()); //bonus! + model.add_contextrule("think", 1.0, vec!("testtag"), vec!()).expect("Adding context rule"); //bonus! + model.add_contextrule("are", 1.0, vec!("testtag"), vec!()).expect("Adding context rule"); //bonus! // ^-- tag the whole entity with 'testtag' - model.add_contextrule("right", 1.0, vec!("testtag"), vec!()); //bonus! + model.add_contextrule("right", 1.0, vec!("testtag"), vec!()).expect("Adding context rule"); //bonus! let mut params = get_test_searchparams(); params.lm_weight = 0.0; //disable normal language model @@ -1203,7 +1203,7 @@ fn test0905_find_all_match_context_rules_multitag() { model.build(); - model.add_contextrule("I; think", 1.1, vec!("testtag", "testtag2"), vec!()); //bonus! + model.add_contextrule("I; think", 1.1, vec!("testtag", "testtag2"), vec!()).expect("Adding context rule"); //bonus! // ^-- tag the whole entity with 'testtag' let mut params = get_test_searchparams();