1+ use crate :: * ;
2+
13#[ test]
24fn test_color ( ) {
3- use crate :: * ;
45 use color:: r#const:: DEFAULT ;
56 let color: Color = Color :: Default ;
67 let color_str: & String = & color. to_string ( ) ;
@@ -9,15 +10,13 @@ fn test_color() {
910
1011#[ test]
1112fn test_color_get_str ( ) {
12- use crate :: * ;
1313 let color_str: & str = & Color :: Default . get_str ( DisplayType :: Text ) ;
1414 let res_color_str: & String = & Color :: Default . to_string ( ) ;
1515 assert_eq ! ( color_str, res_color_str) ;
1616}
1717
1818#[ test]
1919fn test_bg_color ( ) {
20- use crate :: * ;
2120 use color:: r#const:: DEFAULT ;
2221 let bg_color: Color = Color :: Default ;
2322 let bg_color_str: & String = & bg_color. to_string ( ) ;
@@ -26,15 +25,13 @@ fn test_bg_color() {
2625
2726#[ test]
2827fn test_bg_color_get_str ( ) {
29- use crate :: * ;
3028 let bg_color_str: & str = & Color :: Default . get_str ( DisplayType :: Background ) ;
3129 let ans_bg_color_str: & String = & Color :: Default . to_string ( ) ;
3230 assert_eq ! ( bg_color_str, ans_bg_color_str) ;
3331}
3432
3533#[ test]
3634fn test_color256_fg_color ( ) {
37- use crate :: * ;
3835 use color:: r#fn:: color256_fg_color;
3936 let color_str: String = color256_fg_color ( 0x3f3f3f ) ;
4037 let ans_color_str: String = format ! ( "38;5;{}" , 237 ) ;
@@ -43,7 +40,6 @@ fn test_color256_fg_color() {
4340
4441#[ test]
4542fn test_color256_bg_color ( ) {
46- use crate :: * ;
4743 use color:: r#fn:: color256_bg_color;
4844 let color_str: String = color256_bg_color ( 0x000000 ) ;
4945 let ans_color_str: String = format ! ( "48;5;{}" , 16 ) ;
@@ -52,7 +48,6 @@ fn test_color256_bg_color() {
5248
5349#[ test]
5450fn test_rgb_fg_color ( ) {
55- use crate :: * ;
5651 use color:: r#fn:: rgb_fg_color;
5752 let color_str: String = rgb_fg_color ( 255 , 255 , 255 ) ;
5853 let ans_color_str: String = format ! ( "38;2;{};{};{}" , 255 , 255 , 255 ) ;
@@ -61,7 +56,6 @@ fn test_rgb_fg_color() {
6156
6257#[ test]
6358fn test_rgb_bg_color ( ) {
64- use crate :: * ;
6559 use color:: r#fn:: rgb_bg_color;
6660 let color_str: String = rgb_bg_color ( 0 , 0 , 0 ) ;
6761 let ans_color_str: String = format ! ( "48;2;{};{};{}" , 0 , 0 , 0 ) ;
0 commit comments