Commit a7245d8c authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Use custom product function also for seqof

parent e459ff9b
......@@ -182,9 +182,8 @@ def compute_sequence_combinations(asn1_ty, pool):
def compute_sequenceof_combinations(asn1_ty, pool):
''' Generator returning all combinations of arrays '''
for size in xrange(int(asn1_ty.Min), int(asn1_ty.Max) + 1):
elems = []
for _ in xrange(size):
elems.append(compute_combinations(asn1_ty, pool))
for each in itertools.product(*elems):
elems = [partial(compute_combinations, asn1_ty, pool)
for _ in xrange(size)]
for each in myproduct(*elems):
res = '{{ {} }}'.format(', '.join(each))
yield res
......@@ -675,7 +675,6 @@ class sdlHandler(QObject):
if asn1_ty:
print 'Exhausting', name
for arg in compute_combinations(asn1_ty, self.proc.dataview):
#print name, arg
self.click_tc(name, arg)
new_hash = self.current_hash
self.undo()
......@@ -721,6 +720,7 @@ class sdlHandler(QObject):
for (pi, arg) in scenario:
print (' {} ({})'.format(pi, arg))
nb_states += 1
print 'Visited', nb_states
if nb_states >= max_states:
return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment