csc 148			Assignment 3  -- Testing
Fall 1995		Author: Vincent Gogan (csc148 head TA)
==========================================================================

	There are two separate parts of the program that need to be
	tested: the initialization and reading-in of the initial
	grid and the actual calculation of the next generation.

	The testing here relates to the sample solution. 
	
	Test files for the test cases listed here appear at the
	bottom of this file

A) Initializing a grid. Here, we can make the number of number of
generations zero and just watch the display of the initial grid. This
will test both the 'readGrid' routine and the 'displayGrid' routine
without involving 'nextGeneration'.

	Test Cases:
	1. An empty grid.
	2. A single organism in the grid.
	3. Multiple organisms in a single column (all neighbours).
	4. Multiple organisms in a single column (spaces between).
	5. Multiple columns with different patterns.
	6. The four corners.
	7. A complete grid.

	Input files for these cases can be picked up on the CDF PCs.
	They are named TA1.dat,...,  TA7.dat

B) Calculating generations. From part (A), we can be fairly confident
that the routines which create the data structure and display it work
well-enough. Now, we must test 'nextGeneration'. The test cases will
be broken down into categories.

	Test Cases:
		- Single application of rules. Here, we will run the
		simulation for 1 generation and look at the result.

	1. Death Grid. A group of isolated organisms or pairs of
	organisms. These all have zero or one neighbour and should die.
	Pairs should be vertical, horizontal and diagonal.

	2. Empty Grid. Nothing should happen.

	3. Survivors and a birth. Every element has two neighbours. Try
	out the four possible orientations of a little L shape. All the
	originals will survive and a new element will be created in the
	corner. These small squares should survive forever.

	4. Check that behaviour works in different orientations and
	in different column configurations. A good test of this is 
	a little line of length three. This actually oscillates between a
	vertical and horizontal position. This tests the creation
	of organisms in formerly empty columns.

	5. Boundary behaviour. Put lines of length three against every
	boundary. In one generation they should all form lines of length
	2 perpendicular to the original and these should disappear in
	the next generation.

	6. More complex behaviour. Put just a plus sign in the middle of
	the screen. It changes into an empty square which turns into a
	diamond and then a square with bumps, then a square with missing
	corners and then a snowflake and then three lines of length
	three which continue to oscillate.

	7. A big random collection of organisms. This should eventually
	weed itself out into distinctive patterns which may oscillate,
	travel, bump into each other etc. This should test the stability
	of your code in many different configurations. It won't help
	recognize rules being broken.



----- TA1.dat ------------------------------------------------------------
GRID
20 20
END

----- TA2.dat ------------------------------------------------------------
GRID
20 20
COLUMN 5 10 END
END

----- TA3.dat ------------------------------------------------------------
GRID
20 20
COLUMN 5 9 10 11 12 END
END

----- TA4.dat ------------------------------------------------------------
GRID
20 20
COLUMN 5 8 10 12 END
END

----- TA5.dat ------------------------------------------------------------
GRID
20 20
COLUMN 5 8 10 12 END
COLUMN 10 9 11 13 END
COLUMN 15 1 2 8 9 15 19 20 END
END

----- TA6.dat ------------------------------------------------------------
GRID
20 20
COLUMN 1 1 20 END
COLUMN 20 1 20 END
END

----- TA7.dat ------------------------------------------------------------
GRID
20 20
COLUMN 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 11 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 12 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 13 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 18 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
COLUMN 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 END
END

----- TB1.dat ------------------------------------------------------------
GRID
20 20
COLUMN 5 10 END
COLUMN 8 10 11 END
COLUMN 9 5 END
COLUMN 10 5 END
COLUMN 15 15 END
COLUMN 16 14 END
COLUMN 17 5 END
COLUMN 18 6 END
END

----- TB2.dat ------------------------------------------------------------
GRID
20 20
END

----- TB3.dat ------------------------------------------------------------
GRID
20 20
COLUMN 5 15 16 END
COLUMN 6 15 END
COLUMN 8 10 11  END
COLUMN 9 11 END
COLUMN 10 5 END
COLUMN 11 5 6 END
COLUMN 13 16 END
COLUMN 14 15 16 END
END

----- TB4.dat ------------------------------------------------------------
GRID
20 20
COLUMN 2 15 16 17 END
COLUMN 6 5 6 7 END
COLUMN 8 10   END
COLUMN 9 10 END
COLUMN 10 10 END
COLUMN 15 5  END
COLUMN 16 5 END
COLUMN 17 5 END
END

----- TB5.dat ------------------------------------------------------------
GRID
20 20
COLUMN 1 11 12 13  END
COLUMN 6 1  END
COLUMN 7 1   END
COLUMN 8 1 END
COLUMN 15 20  END
COLUMN 16 20 END
COLUMN 17 20 END
COLUMN 20 5 6 7  END
END

----- TB6.dat ------------------------------------------------------------
GRID
20 20
COLUMN 8 10   END
COLUMN 9 9 10 11 END
COLUMN 10 10 END
END

----- TB7.dat ------------------------------------------------------------
GRID
40 40
COLUMN 1 16  18  20  21  22  23  25  26  30  35  37  39 END
COLUMN 2 3  8  15  16  18  20  23  24  27  28  29  30  33 END
COLUMN 3 8  12  14  16  18  20  22  23  26  27  29  31  32  35  38 END
COLUMN 4 12  14  18  22  31  32  36 END
COLUMN 5 3  9  12  13  15  20  21  22  23  31  35  37  38  39 END
COLUMN 6 1  3  6  13  16  19  22  23  25  26  28  29  40 END
COLUMN 7 9  10  11  12  16  20  28  29  30  39  40 END
COLUMN 8 4  5  7  11  12  26  29  31  32  36  40 END
COLUMN 9 3  7  11  14  15  21  24  28  29  33  37 END
COLUMN 10 2  20  23  24  26  30  36  37 END
COLUMN 11 3  9  13  22  26  35  37 END
COLUMN 12 2  6  8  14  19  24  26  28  29  32  38 END
COLUMN 13 2  14  15  27  29  31  32  35  40 END
COLUMN 14 4  9  10  13  14  18  21  23  26  33  34  36  37 END
COLUMN 15 5  10  13  14  15  21  39 END
COLUMN 16 3  4  8  9  20  22  24  29  30  33  36 END
COLUMN 17 3  9  10  17  23  27  30  31  34  36  37 END
COLUMN 18 4  5  6  9  13  14  16  25  26  28  32  33  37  40 END
COLUMN 19 4  5  9  11  12  16  17  20  28  30  34  35  37 END
COLUMN 20 1  2  7  11  13  18  21  27 END
COLUMN 21 3  4  5  9  17  20  24  27  28  32  36  40 END
COLUMN 22 3  4  6  11  16  18  25  26  28  30  34  37 END
COLUMN 23 2  5  7  9  16  17  18  25  26  30  35 END
COLUMN 24 1  2  5  10  14  19  21  26  28  29  32  34  35  37  40 END
COLUMN 25 1  4  7  16  22  24  25  30  34  38  39 END
COLUMN 26 1  3  4  9  10  15  16  17  20  27  28  29  30  34  35  36  37  38  39  40 END
COLUMN 27 2  5  6  8  13  18  19  20  21  24  25  28  32  36 END
COLUMN 28 3  4  11  13  14  16  17  20  24  29  37  40 END
COLUMN 29 2  4  6  8  9  11  17  24  27  28  30  31  32  33  40 END
COLUMN 30 1  5  8  14  15  17  22  24  27  31  34  35 END
COLUMN 31 3  5  11  12  13  26  27  30  34  36  38 END
COLUMN 32 2  10  15  19  24  27  28  29  34  40 END
COLUMN 33 6  11  12  14  18  23  26  30  34  39 END
COLUMN 34 2  5  6  8  10  17  19  20  29  30  32  34  35  36  37 END
COLUMN 35 1  4  8  9  11  13  15  16  19  22  24  25  34  35  36  37  38  40 END
COLUMN 36 1  2  3  8  10  13  14  21  22  26  32  38  39 END
COLUMN 37 1  3  4  6  8  16  23  24  29  32  36  39  40 END
COLUMN 38 4  5  11  12  16  18  20  21  22  29  38 END
COLUMN 39 6  8  9  10  15  16  18  20  24  25  29  34  35  38  40 END
COLUMN 40 3  5  7  10  14  18  22  24  25  29  32  35  38  39  40 END
END
