@@ -5,6 +5,8 @@ use std::os::raw::{c_char, c_int, c_long, c_uchar, c_uint, c_ulonglong, c_void};
55use crate :: isdbs:: isdbd:: * ;
66use crate :: isdbs:: isdbs:: * ;
77
8+ use std:: ffi:: CStr ;
9+
810#[ cfg( test) ]
911mod tests {
1012 use super :: * ;
@@ -123,12 +125,7 @@ mod tests {
123125 font_size : 0 ,
124126 font_scale : FScale { fscx : 0 , fscy : 0 } ,
125127 cell_spacing : 0 ,
126- cursor_pos : DispArea {
127- x : 0 ,
128- y : 0 ,
129- w : 0 ,
130- h : 0 ,
131- } ,
128+ cursor_pos : ISDBPos { x : 0 , y : 0 } ,
132129 ccc : 0 ,
133130 acps : 0 ,
134131 } ,
@@ -162,12 +159,7 @@ mod tests {
162159 font_scale : FScale { fscx : 0 , fscy : 0 } ,
163160 format : WritingFormat :: None ,
164161 cell_spacing : 0 ,
165- cursor_pos : DispArea {
166- x : 0 ,
167- y : 0 ,
168- w : 0 ,
169- h : 0 ,
170- } ,
162+ cursor_pos : ISDBPos { x : 0 , y : 0 } ,
171163 ccc : 0 ,
172164 acps : 0 ,
173165 } ;
@@ -220,12 +212,7 @@ mod tests {
220212 } ,
221213 format : WritingFormat :: None ,
222214 cell_spacing : 0 ,
223- cursor_pos : DispArea {
224- x : 0 ,
225- y : 0 ,
226- w : 0 ,
227- h : 0 ,
228- } ,
215+ cursor_pos : ISDBPos { x : 0 , y : 0 } ,
229216 ccc : 0 ,
230217 acps : 0 ,
231218 } ;
@@ -290,9 +277,6 @@ mod tests {
290277 }
291278 }
292279
293- use super :: * ;
294- use std:: ptr;
295-
296280 #[ test]
297281 fn test___list_del ( ) {
298282 let mut head = ListHead {
@@ -411,9 +395,6 @@ mod tests {
411395 }
412396 }
413397
414- use super :: * ;
415- use std:: ptr;
416-
417398 #[ test]
418399 fn test_list_for_each_entry_safe ( ) {
419400 let mut head = ListHead {
@@ -685,12 +666,7 @@ mod tests {
685666 } ,
686667 format : WritingFormat :: None ,
687668 cell_spacing : 0 ,
688- cursor_pos : DispArea {
689- x : 0 ,
690- y : 0 ,
691- w : 0 ,
692- h : 0 ,
693- } ,
669+ cursor_pos : ISDBPos { x : 0 , y : 0 } ,
694670 ccc : 0 ,
695671 acps : 0 ,
696672 } ;
@@ -719,7 +695,7 @@ mod tests {
719695 buf : unsafe { alloc ( Layout :: from_size_align ( 128 , 1 ) . unwrap ( ) ) } as * mut i8 ,
720696 used : 0 ,
721697 len : 128 ,
722- pos : Position { x : 0 , y : 0 } ,
698+ pos : ISDBPos { x : 0 , y : 0 } ,
723699 txt_tail : ptr:: null_mut ( ) ,
724700 timestamp : 0 ,
725701 refcount : 0 ,
@@ -737,9 +713,6 @@ mod tests {
737713 }
738714 }
739715
740- use super :: * ;
741- use std:: ptr;
742-
743716 #[ test]
744717 fn test_list_add ( ) {
745718 let mut head = ListHead {
@@ -893,7 +866,7 @@ mod tests {
893866 }
894867
895868 #[ test]
896- fn test_ccx_strstr_ignorespace ( ) {
869+ fn test_ccx_strstr_ignorespace_1 ( ) {
897870 let str1 = CString :: new ( "hello world" ) . unwrap ( ) ;
898871 let str2 = CString :: new ( "hello world" ) . unwrap ( ) ;
899872 let result = ccx_strstr_ignorespace ( str1. as_ptr ( ) , str2. as_ptr ( ) ) ;
@@ -980,7 +953,7 @@ mod tests {
980953 }
981954
982955 #[ test]
983- fn test_ccx_strstr_ignorespace ( ) {
956+ fn test_ccx_strstr_ignorespace_2 ( ) {
984957 let str1 = CString :: new ( "hello world" ) . unwrap ( ) ;
985958 let str2 = CString :: new ( "hello world" ) . unwrap ( ) ;
986959 let result = ccx_strstr_ignorespace ( str1. as_ptr ( ) , str2. as_ptr ( ) ) ;
0 commit comments