Changeset 6682
- Timestamp:
- 03/08/10 11:42:36 (18 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
ARBDB/ad_save_load.cxx (modified) (1 diff)
-
UNIT_TESTER/README.txt (modified) (1 diff)
-
UNIT_TESTER/UnitTester.cxx (modified) (2 diffs)
-
UNIT_TESTER/sym2testcode.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ARBDB/ad_save_load.cxx
r6661 r6682 1351 1351 #define TEST_loadsave_CLEANUP() TEST_ASSERT(system("rm -f [ab]2[ab]*.* master.* slave.* renamed.* fast.* fast2b.* TEST_loadsave.ARF") == 0) 1352 1352 1353 void TEST_ loadsave() {1353 void TEST_SLOW_loadsave() { 1354 1354 TEST_loadsave_CLEANUP(); 1355 1355 -
trunk/UNIT_TESTER/README.txt
r6547 r6682 40 40 Failing tests: 41 41 42 If you have some broken behavior that you cannot fix now, please do NOT leave43 the test as "failing". Instead change TEST_ASSERT into42 If you have some broken behavior that you cannot fix now, please do NOT leave 43 the test as "failing". Instead change TEST_ASSERT into 44 44 45 TEST_ASSERT_BROKEN(failing_condition);45 TEST_ASSERT_BROKEN(failing_condition); 46 46 47 That will print a warning as reminder as long as the condition fails. 48 When the behavior was fixed (so that the condition is fulfilled now), 49 it will abort the test as failed! 50 Just change TEST_ASSERT_BROKEN back into TEST_ASSERT then. 47 That will print a warning as reminder as long as the condition fails. 48 When the behavior was fixed (so that the condition is fulfilled now), 49 it will abort the test as failed! 50 Just change TEST_ASSERT_BROKEN back into TEST_ASSERT then. 51 51 52 52 53 Missing tests: 53 54 54 You may drop a reminder like55 You may drop a reminder like 55 56 56 MISSING_TEST(describe what is missing);57 MISSING_TEST(describe what is missing); 57 58 58 which will appear as warning during test run. 59 which will appear as warning during test run. 60 61 62 Order of tests: 63 64 Tests are executed in the order they appear in the code. 65 Multiple Files are sorted alphabethically. 66 67 Tests with names starting with 'TEST_SLOW_' are executed after 68 all other tests. These are meant to indicate "slow" tests 69 (i.e. tests which need more than a second to execute) 59 70 60 71 -
trunk/UNIT_TESTER/UnitTester.cxx
r6677 r6682 18 18 #include <cstdlib> 19 19 #include <cstdio> 20 #include <cstring> 20 21 21 22 #include <sys/time.h> … … 152 153 } 153 154 155 if (duration_ms_this>1000) { // long test duration 156 if (strlen(test.name) <= 10 || memcmp(test.name, "TEST_SLOW_", 10) != 0) { 157 fprintf(stderr, "%s: Warning: Name of slow tests shall start with TEST_SLOW_ (it'll be run after other tests)\n", 158 test.location); 159 } 160 } 161 154 162 return result == TEST_OK; 155 163 } -
trunk/UNIT_TESTER/sym2testcode.pl
r6653 r6682 141 141 } keys %$id_r; 142 142 143 # sort TEST_SLOW_ to the end 144 { 145 my @tests_fast = (); 146 my @tests_slow = (); 147 148 foreach (@tests) { 149 if (/^TEST_SLOW_/) { push @tests_slow, $_; } 150 else { push @tests_fast, $_; } 151 } 152 153 @tests = @tests_fast; 154 push @tests, @tests_slow; 155 } 156 143 157 my $code = ''; 144 158
