From 47408ccbf1d2bcd3ab2420885cffb7fa38c53960 Mon Sep 17 00:00:00 2001 From: Sakapoi <97370653+Sakapoi@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:38:00 +0300 Subject: [PATCH] READY(strs_tools): fixed tests (#1426) * fixed tests * fixed global import --- .../core/strs_tools/tests/inc/number_test.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/module/core/strs_tools/tests/inc/number_test.rs b/module/core/strs_tools/tests/inc/number_test.rs index cc8bf03006..2c03f223d1 100644 --- a/module/core/strs_tools/tests/inc/number_test.rs +++ b/module/core/strs_tools/tests/inc/number_test.rs @@ -1,5 +1,4 @@ use super::*; - // tests_impls! @@ -10,43 +9,43 @@ tests_impls! /* test.case( "parse" ); */ { - a_id!( the_module::number::parse::< f32, _ >( "1.0" ), Ok( 1.0 ) ); + a_id!( crate::the_module::string::number::parse::< f32, _ >( "1.0" ), Ok( 1.0 ) ); } /* test.case( "parse_partial" ); */ { - a_id!( the_module::number::parse_partial::< i32, _ >( "1a" ), Ok( ( 1, 1 ) ) ); + a_id!( crate::the_module::string::number::parse_partial::< i32, _ >( "1a" ), Ok( ( 1, 1 ) ) ); } /* test.case( "parse_partial_with_options" ); */ { - const FORMAT : u128 = the_module::number::format::STANDARD; - let options = the_module::number::ParseFloatOptions::builder() + const FORMAT : u128 = crate::the_module::string::number::format::STANDARD; + let options = crate::the_module::string::number::ParseFloatOptions::builder() .exponent( b'^' ) .decimal_point( b',' ) .build() .unwrap(); - let got = the_module::number::parse_partial_with_options::< f32, _, FORMAT >( "0", &options ); + let got = crate::the_module::string::number::parse_partial_with_options::< f32, _, FORMAT >( "0", &options ); let exp = Ok( ( 0.0, 1 ) ); a_id!( got, exp ); } /* test.case( "parse_with_options" ); */ { - const FORMAT: u128 = the_module::number::format::STANDARD; - let options = the_module::number::ParseFloatOptions::builder() + const FORMAT: u128 = crate::the_module::string::number::format::STANDARD; + let options = crate::the_module::string::number::ParseFloatOptions::builder() .exponent( b'^' ) .decimal_point( b',' ) .build() .unwrap(); - let got = the_module::number::parse_with_options::< f32, _, FORMAT >( "1,2345", &options ); + let got = crate::the_module::string::number::parse_with_options::< f32, _, FORMAT >( "1,2345", &options ); let exp = Ok( 1.2345 ); a_id!( got, exp ); } /* test.case( "to_string" ); */ { - a_id!( the_module::number::to_string( 5 ), "5" ); + a_id!( crate::the_module::string::number::to_string( 5 ), "5" ); } }