diff --git a/src/dead_code_tests.rs b/src/dead_code_tests.rs index ee67651..0f0924e 100644 --- a/src/dead_code_tests.rs +++ b/src/dead_code_tests.rs @@ -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");