Skip to content

Tweak test name and make it more specific #12185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// except according to those terms.


// This test verifies that temporaries created for `while`'s
// and `if` conditions are correctly cleaned up.
// This test verifies that temporaries created for `while`'s and `if`
// conditions are dropped after the condition is evaluated.

struct Temporary;

Expand All @@ -37,6 +37,7 @@ pub fn main() {
// `drop` 6 times.
while borrow().do_stuff() {
i += 1;
unsafe { assert_eq!(DROPPED, i) }
if i > 5 {
break;
}
Expand All @@ -45,6 +46,6 @@ pub fn main() {
// This if condition should
// call it 1 time
if borrow().do_stuff() {
unsafe { assert_eq!(DROPPED, 7) }
unsafe { assert_eq!(DROPPED, i + 1) }
}
}