Ignore:
Timestamp:
Apr 16, 2009, 2:47:08 PM (15 years ago)
Author:
buchmann
Message:

Fix the regression test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sources/test_regression/28102005/system.cpp

    r18 r23  
    2727check_time (int i)
    2828{
    29         const sc_time &t = sc_time_stamp ();
     29  const sc_time &t = sc_time_stamp ();
    3030  CERR(i);
    3131  CERR(t.to_double());
     32#ifdef SYSTEMCASS_SPECIFIC
     33  ASSERT((int) (t.to_double ()) == i);
     34#else
    3235  ASSERT((int) (t.to_double ()) == i * 1000);
     36#endif
    3337  CERR(t.to_seconds ());
    3438        double seconds = t.to_seconds()*1000000000;
     
    3741  char s[256];
    3842  const char *unit;
     43#ifdef SYSTEMCASS_SPECIFIC
     44  unit = "NS";
     45#else
    3946  if (i == 0)
    4047    unit = "s";
     
    4350  else
    4451    unit = "ns";
     52#endif
    4553  sprintf (s, "%d %s", i,unit);
    4654  CERR(s);
     
    5563
    5664  check_time (0);
    57         sc_start (0);
     65  sc_start (0);
    5866
    5967  check_time (0);
    60         sc_start (1);
     68  sc_start (1);
    6169  check_time (1);
    6270
    63         sc_start (15);
     71  sc_start (15);
    6472  check_time (16);
    6573
    66         sc_start (7);
     74  sc_start (7);
    6775  check_time (23);
    6876
    69         sc_start (100);
     77  sc_start (100);
    7078  check_time (123);
    7179
    72         sc_start (1000);
     80  sc_start (1000);
    7381  check_time (1123);
    7482  cerr << "Test OK.\n";
Note: See TracChangeset for help on using the changeset viewer.