File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -1013,6 +1013,16 @@ extern "C" {
1013
1013
mod tests {
1014
1014
use super :: * ;
1015
1015
1016
+ #[ test]
1017
+ fn it_calculates_usable_size ( ) {
1018
+ let ptr = unsafe { mi_malloc ( 32 ) } as * mut u8 ;
1019
+ let usable_size = unsafe { mi_usable_size ( ptr as * mut c_void ) } ;
1020
+ assert ! (
1021
+ usable_size >= 32 ,
1022
+ "usable_size should at least equal to the allocated size"
1023
+ ) ;
1024
+ }
1025
+
1016
1026
#[ test]
1017
1027
fn runtime_stable_option ( ) {
1018
1028
unsafe {
Original file line number Diff line number Diff line change @@ -89,14 +89,4 @@ mod tests {
89
89
let ptr = unsafe { mi_realloc_aligned ( ptr as * mut c_void , 8 , 8 ) } as * mut u8 ;
90
90
unsafe { mi_free ( ptr as * mut c_void ) } ;
91
91
}
92
-
93
- #[ test]
94
- fn it_calculates_usable_size ( ) {
95
- let ptr = unsafe { mi_malloc ( 32 ) } as * mut u8 ;
96
- let usable_size = unsafe { mi_usable_size ( ptr as * mut c_void ) } ;
97
- assert ! (
98
- usable_size >= 32 ,
99
- "usable_size should at least equal to the allocated size"
100
- ) ;
101
- }
102
92
}
You can’t perform that action at this time.
0 commit comments