mirror of
https://github.com/astro/deadnix.git
synced 2024-12-01 00:22:07 +03:00
dead_code_tests: add more alive tests
This commit is contained in:
parent
7d4d52be15
commit
773345bbbe
@ -52,6 +52,12 @@ fn let_in_inherit_dead() {
|
||||
assert_eq!(results[0].name.as_str(), "dead");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lambda_arg_alive() {
|
||||
let results = run("alive: alive");
|
||||
assert_eq!(0, results.len());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lambda_arg_dead() {
|
||||
let results = run("dead: false");
|
||||
@ -60,6 +66,12 @@ fn lambda_arg_dead() {
|
||||
assert_eq!(results[0].name.as_str(), "dead");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lambda_at_alive() {
|
||||
let results = run("alive@{ ... }: alive");
|
||||
assert_eq!(0, results.len());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lambda_at_dead() {
|
||||
let results = run("dead@{ ... }: false");
|
||||
@ -68,6 +80,12 @@ fn lambda_at_dead() {
|
||||
assert_eq!(results[0].name.as_str(), "dead");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lambda_pattern_alive() {
|
||||
let results = run("{ alive, ... }: alive");
|
||||
assert_eq!(0, results.len());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lambda_pattern_dead() {
|
||||
let results = run("alive@{ dead, ... }: alive");
|
||||
|
Loading…
Reference in New Issue
Block a user