File tree 3 files changed +14
-5
lines changed
3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -516,6 +516,7 @@ pub mod tests {
516
516
assert!( crate :: handle:: refcount( fileid) . is_err( ) ) ;
517
517
assert!( crate :: handle:: refcount( groupid) . is_err( ) ) ;
518
518
assert!( !group. is_valid( ) ) ;
519
+ drop( group) ;
519
520
} ) ;
520
521
} ) ;
521
522
}
Original file line number Diff line number Diff line change @@ -229,6 +229,9 @@ pub mod tests {
229
229
h5lock ! ( {
230
230
file. close( ) . unwrap( ) ;
231
231
assert_eq!( format!( "{:?}" , a) , "<HDF5 group: invalid id>" ) ;
232
+ drop( a) ;
233
+ drop( ab) ;
234
+ drop( abc) ;
232
235
} )
233
236
} )
234
237
}
Original file line number Diff line number Diff line change @@ -114,11 +114,14 @@ pub mod tests {
114
114
obj. decref ( ) ;
115
115
assert_eq ! ( obj. refcount( ) , 1 ) ;
116
116
obj. decref ( ) ;
117
- obj. decref ( ) ;
118
- assert_eq ! ( obj. refcount( ) , 0 ) ;
119
- assert ! ( !obj. is_valid( ) ) ;
120
- assert ! ( !is_valid_user_id( obj. id( ) ) ) ;
121
- assert ! ( !is_valid_id( obj. id( ) ) ) ;
117
+ h5lock ! ( {
118
+ obj. decref( ) ;
119
+ assert_eq!( obj. refcount( ) , 0 ) ;
120
+ assert!( !obj. is_valid( ) ) ;
121
+ assert!( !is_valid_user_id( obj. id( ) ) ) ;
122
+ assert!( !is_valid_id( obj. id( ) ) ) ;
123
+ drop( obj) ;
124
+ } ) ;
122
125
}
123
126
124
127
#[ test]
@@ -156,6 +159,8 @@ pub mod tests {
156
159
obj. decref( ) ;
157
160
assert!( !obj. is_valid( ) ) ;
158
161
assert!( !obj2. is_valid( ) ) ;
162
+ drop( obj) ;
163
+ drop( obj2) ;
159
164
} ) ;
160
165
}
161
166
}
You can’t perform that action at this time.
0 commit comments