<commit_before>
#[ allow( unused_imports ) ]
use super::*;

//

tests_impls!
{

  #[ cfg( any( feature = "chrono", feature = "time_chrono" ) ) ]
  #[ test ]
  fn basic()
  {
    use TheModule::*;

    // test.case( "time::now" );
    let got = time::now();
    assert!( got > 0 );

    // test.case( "time::ms::now" );
    let got1 = time::now();
    let got2 = time::ms::now();
    a_id!( got1, got2 );

    // // test.case( "time::ns::now" );
    // let got1 = time::now();
    // let got2 = time::ns::now();
    // a_id!( got1, got2 / 1000000 );
    // zzz : use equal!

    // test.case( "time::s::now" );
    let got1 = time::now();
    let got2 = time::s::now();
    a_id!( got1 / 1000, got2 );
  }

}

//

tests_index!
{
  basic,
}<commit_msg>Fix tests of module `time_tools`, add time delta to test checks<commit_after>
#[ allow( unused_imports ) ]
use super::*;

//

tests_impls!
{

  #[ cfg( any( feature = "chrono", feature = "time_chrono" ) ) ]
  fn basic()
  {
    use TheModule::*;

    // test.case( "time::now" );
    let got = time::now();
    a_true!( got > 0 );

    // test.case( "time::ms::now" );
    let got1 = time::now();
    let got2 = time::ms::now();
    a_true!( got2 - got2 <= 10 );

    // // test.case( "time::ns::now" );
    let got1 = time::now();
    let got2 = time::ns::now();
    a_true!( got2 / 1_000_000 - got1 <= 10 );
    // zzz : use equal!

    // test.case( "time::s::now" );
    let got1 = time::now();
    let got2 = time::s::now();
    a_id!( got1 / 1000, got2 );
  }

}

//

tests_index!
{
  basic,
}
{'fraction_non_alphanumeric': 0.22595222724338282, 'fraction_numerical': 0.03357004519044545, 'mean_word_length': 2.347732181425486, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6621484', 'n_tokens_mistral': 645, 'n_tokens_neox': 612, 'n_words': 141}