Project

General

Profile

Bug #6862

If a block contains several sequences, only one is returned by the iterator

Added by Alexander Kamkin over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Andrei Tatarnikov
Category:
-
Target version:
Start date:
02/12/2016
Due date:
% Done:

0%

Estimated time:
Detected in build:
svn
Platform:
Published in build:
2.3.51

Description

  def run
    block(:combinator => 'random', :permutator => 'random', :compositor => 'catenation') {
      block {
        sequence {
          pseudo 'A1'
          pseudo 'A2'
          pseudo 'A3'
        }
        sequence {}
      }
      block {
        sequence {
          pseudo 'B1'
          pseudo 'B2'
          pseudo 'B3'
        }
        sequence {}
      }
      block {
        sequence {
          pseudo 'C1'
          pseudo 'C2'
          pseudo 'C3'
        }
        sequence {}
      }
    }.run 10
  end

History

#1

Updated by Andrei Tatarnikov over 4 years ago

  • Status changed from New to Resolved

The description is not 100% clear to me at the moment. However, empty sequences nested into blocks are now returned. So the issue can be considered resolved.

In the current version (2.3.31), syntax is the following:

def run
  block(:combinator => 'random', :permutator => 'random', :compositor => 'catenation') {
    iterate {
      sequence {
        pseudo 'A1'
        pseudo 'A2'
        pseudo 'A3'
      }
      sequence {}
    }
    iterate {
      sequence {
        pseudo 'B1'
        pseudo 'B2'
        pseudo 'B3'
      }
      sequence {}
    }
    iterate {
      sequence {
        pseudo 'C1'
        pseudo 'C2'
        pseudo 'C3'
      }
      sequence {}
    }
  }.run 10
end

And it gives the following sequences:

//============================================ Test 0 ==============================================

//==================================================================================================
// Test Case 0

//============================================ Test 1 ==============================================

//==================================================================================================
// Test Case 1
C1
C2
C3
A1
A2
A3

//============================================ Test 2 ==============================================

//==================================================================================================
// Test Case 2
B1
B2
B3
A1
A2
A3

//============================================ Test 3 ==============================================

//==================================================================================================
// Test Case 3
A1
A2
A3

//============================================ Test 4 ==============================================

//==================================================================================================
// Test Case 4
C1
C2
C3
A1
A2
A3

//============================================ Test 5 ==============================================

//==================================================================================================
// Test Case 5
A1
A2
A3
C1
C2
C3
B1
B2
B3

//============================================ Test 6 ==============================================

//==================================================================================================
// Test Case 6
C1
C2
C3

//============================================ Test 7 ==============================================

//==================================================================================================
// Test Case 7
B1
B2
B3
C1
C2
C3

//============================================ Test 8 ==============================================

//==================================================================================================
// Test Case 8
C1
C2
C3
B1
B2
B3

//============================================ Test 9 ==============================================

//==================================================================================================
// Test Case 9
B1
B2
B3
#2

Updated by Andrei Tatarnikov almost 4 years ago

  • Status changed from Resolved to Closed
#3

Updated by Andrei Tatarnikov almost 4 years ago

  • Published in build set to 2.3.51

Also available in: Atom PDF