Updated TestGeneration

Hai-Feng Guo

Fixed a bug for the following cfg input:

S ::= A B
A ::= C
C ::= 1
B ::= 2

It should generate a single test case. Let me know if it causes other
problems.