&sectionHeader('Given Order');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('001', 'Cities from Example');
$subtotal += &runTest('002', 'Different 6 cities');
$subtotal += &runTest('003', '12 Cities');
$total += floor($subtotal);
&sectionResults('Given Order', $subtotal, 3, $checkpoint );
$testCount += 3;

&sectionHeader('Nearest Heuristic');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('004', 'No Reversal');
$subtotal += &runTest('005', 'Different 6 cities');
$subtotal += &runTest('006', 'Cities from Example (needs reversal)');
$subtotal += &runTest('007', '12 Cities');
$total += floor($subtotal);
&sectionResults('Nearest Heuristic', $subtotal, 4, $checkpoint );
$testCount += 4;

&sectionHeader('Insert Heuristic');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('008', 'No Rotation or Reversal');
$subtotal += &runTest('009', '6 Cities with Reversal');
$subtotal += &runTest('010', 'Cities from Example');
$subtotal += &runTest('011', 'Different 6 cities');
$subtotal += &runTest('012', '12 Cities');
$subtotal += &runTest('013', 'Insert Avelo Tweed Network');
$total += floor($subtotal);
&sectionResults('Insert Heuristic', $subtotal, 6, $checkpoint );
$testCount += 6;

&sectionHeader('City Names');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('014', 'Long city names');
$subtotal += &runTest('015', 'Whitespace in city names');
$subtotal += &runTest('016', 'Other nonalphabetic characters');
$total += floor($subtotal);
&sectionResults('City Names', $subtotal, 3, $checkpoint );
$testCount += 3;

&sectionHeader('Multiple Methods');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('017', 'Given + Insert');
$subtotal += &runTest('018', 'Nearest + Insert');
$subtotal += &runTest('019', 'All three');
$subtotal += &runTest('020', 'Repeats');
$total += floor($subtotal);
&sectionResults('Multiple Methods', $subtotal, 4, $checkpoint );
$testCount += 4;

&sectionHeader('Location edge cases');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('021', 'Nearest with ties');
$subtotal += &runTest('022', 'Insert with poles');
$subtotal += &runTest('023', 'Two airports at same location');
$total += floor($subtotal);
&sectionResults('Location edge cases', $subtotal, 3, $checkpoint );
$testCount += 3;

&sectionHeader('Invalid Command-line Arguments');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('024', 'No arguments');
$subtotal += &runTest('025', 'File not found');
$subtotal += &runTest('026', 'No cities on command line');
$subtotal += &runTest('027', 'Invalid method first');
$subtotal += &runTest('028', 'Empty method name');
$subtotal += &runTest('029', 'Multiple invalid methods');
$total += floor($subtotal);
&sectionResults('Invalid Command-line Arguments', $subtotal, 6, $checkpoint );
$testCount += 6;

&sectionHeader('Invalid Data File');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('030', 'Mismatched City Name');
$subtotal += &runTest('031', 'Out-of-order City Names');
$subtotal += &runTest('032', 'Empty city name out of order in location data file');
$subtotal += &runTest('033', 'Whitespace in latitude');
$subtotal += &runTest('034', 'Missing longitude');
$subtotal += &runTest('035', 'Empty latitude');
$subtotal += &runTest('036', 'Non-numeric latitude');
$subtotal += &runTest('037', 'Comma in city name in location data file');
$subtotal += &runTest('038', 'EOF in longitude');
$subtotal += &runTest('039', 'Blank line at end of location data file');
$total += floor($subtotal);
&sectionResults('Invalid Data File', $subtotal, 10, $checkpoint );
$testCount += 10;

&sectionHeader('Valgrind (repeats some tests, checking for errors w/ valgrind)');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('040', 'Given; Cities from Example');
$subtotal += &runTest('041', 'Nearest; Cities from Example (needs reversal)');
$subtotal += &runTest('042', 'Insert Avelo Tweed Network');
$subtotal += &runTest('043', 'Long city names');
$subtotal += &runTest('044', 'Other nonalphabetic characters');
$subtotal += &runTest('045', 'Repeats');
$subtotal += &runTest('046', 'Missing longitude');
$total += floor($subtotal);
&sectionResults('Valgrind (repeats some tests, checking for errors w/ valgrind)', $subtotal, 7, $checkpoint );
$testCount += 7;

&sectionHeader('Challenge (just for fun!)');
$subtotal = 0;
@SOURCE = ();
@LINK = ();
$subtotal = &runTest('047', 'Insert, 512 cities');
$subtotal = $subtotal * 0 / 1;
$total += floor($subtotal);
&sectionResults('Challenge (just for fun!)', $subtotal, 1, $checkpoint );
$testCount += 1;

