&sectionHeader('Core Unit Tests');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('001', 'Create and destroy');
$subtotal += &runTest('002', 'Empty track');
$subtotal += &runTest('003', 'Add copies trackpoints');
$subtotal += &runTest('004', 'Single segment');
$subtotal += &runTest('005', 'Two segments');
$subtotal += &runTest('006', 'Counts');
$subtotal += &runTest('007', 'Heatmap');
$total += floor($subtotal);
&sectionResults('Core Unit Tests', $subtotal, 7, $checkpoint );
$testCount += 7;

&sectionHeader('Unit Tests with Valgrind');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('008', 'Create and destroy');
$subtotal += &runTest('009', 'Empty track');
$subtotal += &runTest('010', 'Add copies trackpoints');
$subtotal += &runTest('011', 'Single segment');
$subtotal += &runTest('012', 'Two segments');
$subtotal += &runTest('013', 'Counts');
$subtotal += &runTest('014', 'Heatmap');
$total += floor($subtotal);
&sectionResults('Unit Tests with Valgrind', $subtotal, 7, $checkpoint );
$testCount += 7;

&sectionHeader('Merge');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('015', 'Merge');
$subtotal += &runTest('016', 'Merge including 1st segment');
$subtotal += &runTest('017', 'Merge one segment');
$total += floor($subtotal);
&sectionResults('Merge', $subtotal, 3, $checkpoint );
$testCount += 3;

&sectionHeader('Merge w/ Valgrind');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('018', 'Merge');
$subtotal += &runTest('019', 'Merge including 1st segment');
$subtotal += &runTest('020', 'Merge one segment');
$total += floor($subtotal);
&sectionResults('Merge w/ Valgrind', $subtotal, 3, $checkpoint );
$testCount += 3;

&sectionHeader('Many Points and Segments (testing dynamic allocation)');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('021', 'Memory usage for 1 segment, 1 track point is reasonable');
if ($subtotal >= 1) {
$subtotal += &runTest('022', 'Many track points, one segment');
}
else {
skipTest('022', 'Many track points, one segment');
}
$subtotal += &runTest('023', 'Many segments, one track point per');
$total += floor($subtotal);
&sectionResults('Many Points and Segments (testing dynamic allocation)', $subtotal, 3, $checkpoint );
$testCount += 3;

&sectionHeader('Many Points and Segments w/ Valgrind');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('024', 'Many track points, one segment');
$subtotal += &runTest('025', 'Many segments, one track point per');
$total += floor($subtotal);
&sectionResults('Many Points and Segments w/ Valgrind', $subtotal, 2, $checkpoint );
$testCount += 2;

&sectionHeader('180/-180 Hemishpere Crossing');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('026', 'Hemisphere Crossing');
$total += floor($subtotal);
&sectionResults('180/-180 Hemishpere Crossing', $subtotal, 1, $checkpoint );
$testCount += 1;

&sectionHeader('Heatmaps');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('027', '2-by-2');
$subtotal += &runTest('028', 'Walking a grid');
$subtotal += &runTest('029', 'Long circuit');
$subtotal += &runTest('030', 'Valgrind on long circuit');
$total += floor($subtotal);
&sectionResults('Heatmaps', $subtotal, 4, $checkpoint );
$testCount += 4;

