~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to lib/GenTest/Generator/FromGrammar.pm

Minor corrections:
- huge grammars like WL5004_sql.yy need a bigger
  value GENERATOR_MAX_LENGTH
- message after check ($#sentence > GENERATOR_MAX_LENGTH )

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
use constant GENERATOR_VARCHAR_LENGTH   => 10;
28
28
 
29
29
use constant GENERATOR_MAX_OCCURRENCES  => 500;
30
 
use constant GENERATOR_MAX_LENGTH       => 1024;
 
30
use constant GENERATOR_MAX_LENGTH       => 2048;
31
31
 
32
32
my $field_pos;
33
33
 
165
165
        my $pos = 0;
166
166
        while ($pos <= $#sentence) {
167
167
                if ($#sentence > GENERATOR_MAX_LENGTH) {
168
 
                        say("Sentence is now longer than ".GENERATOR_MAX_OCCURRENCES()." symbols. Possible endless loop in grammar. Aborting.");
 
168
                        say("Sentence is now longer than ".GENERATOR_MAX_LENGTH()." symbols. Possible endless loop in grammar. Aborting.");
169
169
                        return undef;
170
170
                }
171
171
                if (ref($sentence[$pos]) eq 'GenTest::Grammar::Rule') {