Add debugging output in test via logger
This commit is contained in:
parent
089d5b98cb
commit
3bf3a8890b
2 changed files with 14 additions and 3 deletions
|
@ -581,23 +581,24 @@ pub mod header_filter_lang {
|
|||
|
||||
#[test]
|
||||
fn test_list_of_val() {
|
||||
setup_logging();
|
||||
{
|
||||
let list = list_of_val(b"[]");
|
||||
println!("list: {:?}", list);
|
||||
debug!("list: {:?}", list);
|
||||
let vals = list.unwrap().1;
|
||||
assert_eq!(vals, vec![]);
|
||||
}
|
||||
|
||||
{
|
||||
let list = list_of_val(b"[1]");
|
||||
println!("list: {:?}", list);
|
||||
debug!("list: {:?}", list);
|
||||
let vals = list.unwrap().1;
|
||||
assert_eq!(vals, vec![Value::Integer(1)]);
|
||||
}
|
||||
|
||||
{
|
||||
let list = list_of_val(b"[12,13]");
|
||||
println!("list: {:?}", list);
|
||||
debug!("list: {:?}", list);
|
||||
let vals = list.unwrap().1;
|
||||
assert_eq!(vals, vec![Value::Integer(12), Value::Integer(13)]);
|
||||
}
|
||||
|
|
|
@ -921,6 +921,10 @@ mod test {
|
|||
|
||||
use toml::Value;
|
||||
|
||||
fn setup_logging() {
|
||||
let _ = env_logger::try_init();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_imag_section() {
|
||||
let mut map = BTreeMap::new();
|
||||
|
@ -1017,9 +1021,15 @@ Hai
|
|||
|
||||
#[cfg(test)]
|
||||
mod store_tests {
|
||||
extern crate env_logger;
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
||||
fn setup_logging() {
|
||||
let _ = env_logger::try_init();
|
||||
}
|
||||
|
||||
use super::Store;
|
||||
use file_abstraction::InMemoryFileAbstraction;
|
||||
|
||||
|
|
Loading…
Reference in a new issue