- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sources/test_regression/28102005/system.cpp
r23 r18 27 27 check_time (int i) 28 28 { 29 29 const sc_time &t = sc_time_stamp (); 30 30 CERR(i); 31 31 CERR(t.to_double()); 32 #ifdef SYSTEMCASS_SPECIFIC33 ASSERT((int) (t.to_double ()) == i);34 #else35 32 ASSERT((int) (t.to_double ()) == i * 1000); 36 #endif37 33 CERR(t.to_seconds ()); 38 34 double seconds = t.to_seconds()*1000000000; … … 41 37 char s[256]; 42 38 const char *unit; 43 #ifdef SYSTEMCASS_SPECIFIC44 unit = "NS";45 #else46 39 if (i == 0) 47 40 unit = "s"; … … 50 43 else 51 44 unit = "ns"; 52 #endif53 45 sprintf (s, "%d %s", i,unit); 54 46 CERR(s); … … 63 55 64 56 check_time (0); 65 57 sc_start (0); 66 58 67 59 check_time (0); 68 60 sc_start (1); 69 61 check_time (1); 70 62 71 63 sc_start (15); 72 64 check_time (16); 73 65 74 66 sc_start (7); 75 67 check_time (23); 76 68 77 69 sc_start (100); 78 70 check_time (123); 79 71 80 72 sc_start (1000); 81 73 check_time (1123); 82 74 cerr << "Test OK.\n";
Note: See TracChangeset
for help on using the changeset viewer.