Skip to content

Commit

Permalink
remove extra tests
Browse files Browse the repository at this point in the history
  • Loading branch information
niamster committed Jun 21, 2017
1 parent b33cbb0 commit 61c58dd
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions src/logger.rs
Expand Up @@ -672,45 +672,4 @@ mod tests {
assert_eq!(sum, expected);
});
}

#[test]
fn test_logger_spec_simple() {
run_test(|_| {
let spec = format!("critical,{},foo=info", this_file!());
wp_set_level!(spec(&spec)).unwrap();
assert_eq!(wp_get_level!(^), LogLevel::CRITICAL);
assert_eq!(wp_get_level!(), LogLevel::TRACE);
assert_eq!(wp_get_level!("foo"), LogLevel::INFO);
});
}

#[test]
fn test_logger_spec_json_valid() {
run_test(|_| {
let spec = format!(
r#"{{
"level": "debug",
"modules": [
{{
"path": "foo"
}},
{{
"path": "{}",
"level": "notice"
}},
{{
"path": "{}",
"level": "critical",
"lines": [[{}, {}]]
}}
]
}}"#,
this_file!(), this_file!(), line!() + 4, line!() + 100);
wp_set_level!(spec(&spec)).unwrap();
assert_eq!(wp_get_level!(^), LogLevel::DEBUG);
assert_eq!(wp_get_level!(), LogLevel::NOTICE);
assert_eq!(wp_get_level!("foo"), LogLevel::TRACE);
assert_eq!(wp_get_level!(), LogLevel::CRITICAL);
});
}
}

0 comments on commit 61c58dd

Please sign in to comment.