test: move test_arr_to_string() to dc_array.rs

This commit is contained in:
Lars-Magnus Skog
2019-06-07 19:42:05 +02:00
parent af8d056206
commit e97f6acccd
2 changed files with 14 additions and 15 deletions
+14 -1
View File
@@ -404,6 +404,20 @@ mod tests {
use super::*;
use std::ffi::CStr;
#[test]
fn test_dc_arr_to_string() {
let arr2: [uint32_t; 4] = [
0i32 as uint32_t,
12i32 as uint32_t,
133i32 as uint32_t,
1999999i32 as uint32_t,
];
let str_0 = unsafe { dc_arr_to_string(arr2.as_ptr(), 4i32) };
assert_eq!(to_string(str_0), "0,12,133,1999999");
unsafe { free(str_0 as *mut _) };
}
#[test]
fn test_dc_array() {
unsafe {
@@ -491,5 +505,4 @@ mod tests {
dc_array_unref(arr);
}
}
}
-14
View File
@@ -952,17 +952,3 @@ fn test_stress_tests() {
stress_functions(&context.ctx);
}
}
#[test]
fn test_arr_to_string() {
let arr2: [uint32_t; 4] = [
0i32 as uint32_t,
12i32 as uint32_t,
133i32 as uint32_t,
1999999i32 as uint32_t,
];
let str_0 = unsafe { dc_arr_to_string(arr2.as_ptr(), 4i32) };
assert_eq!(to_string(str_0), "0,12,133,1999999");
unsafe { free(str_0 as *mut _) };
}