
use test_tools::*;

use super::TheModule;

//

tests_impls!
{
  #[ 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();
    assert_eq!( got1, got2 );

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

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

//

tests_index!
{
  basic,
}


use test_tools::*;

use super::TheModule;

//

fn basic_test()
{
  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();
  assert_eq!( got1, got2 );

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

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

}

//

test_suite!
{
  basic,
}

--- 
+++ 
@@ -5,35 +5,38 @@
 
 //
 
-fn basic_test()
+tests_impls!
 {
-  use TheModule::*;
+  #[ test ]
+  fn basic()
+  {
+    use TheModule::*;
 
-  // test.case( "time::now" );
-  let got = time::now();
-  assert!( got > 0 );
+    // 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();
-  assert_eq!( got1, got2 );
+    // test.case( "time::ms::now" );
+    let got1 = time::now();
+    let got2 = time::ms::now();
+    assert_eq!( got1, got2 );
 
-  // // test.case( "time::ns::now" );
-  // let got1 = time::now();
-  // let got2 = time::ns::now();
-  // assert_eq!( got1, got2 / 1000000 );
-  // zzz : use equal!
+    // // test.case( "time::ns::now" );
+    // let got1 = time::now();
+    // let got2 = time::ns::now();
+    // assert_eq!( got1, got2 / 1000000 );
+    // zzz : use equal!
 
-  // test.case( "time::s::now" );
-  let got1 = time::now();
-  let got2 = time::s::now();
-  assert_eq!( got1 / 1000, got2 );
-
+    // test.case( "time::s::now" );
+    let got1 = time::now();
+    let got2 = time::s::now();
+    assert_eq!( got1 / 1000, got2 );
+  }
 }
 
 //
 
-test_suite!
+tests_index!
 {
   basic,
 }
Update tests of module `time_tools`, use new test macroses
