mirror of
https://github.com/Noratrieb/cargo-minimize.git
synced 2026-01-14 16:35:01 +01:00
more tests
This commit is contained in:
parent
75108c8553
commit
4f4afa627d
7 changed files with 69 additions and 24 deletions
|
|
@ -22,3 +22,25 @@ fn hello_world_no_verify() -> Result<()> {
|
|||
},
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unused() -> Result<()> {
|
||||
// After everybody_loops, `unused` becomes dead and should be removed.
|
||||
run_test(
|
||||
r##"
|
||||
fn unused() {}
|
||||
|
||||
fn main() {
|
||||
unused();
|
||||
}
|
||||
"##,
|
||||
r##"
|
||||
fn main() {
|
||||
loop {}
|
||||
}
|
||||
"##,
|
||||
|opts| {
|
||||
opts.no_verify = true;
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue