2.2.1. test/regress//stl-1.01.01

Start felix section to test/regress//stl-1.01.01-0.flx[1 /1 ]
     1: #line 482 "./lpsrc/flx_stl.pak"
     2: //Check STL::vector
     3: #import <flx.flxh>
     4: include "stl";
     5: 
     6: var x: stl_vector[int];
     7: 
     8: print$ empty x; endl;
     9: 
    10: push_back  (x,4);
    11: push_back  (x,5);
    12: push_back  (x,6);
    13: 
    14: insert (x,begin x,3);
    15: insert (x,end x,7);
    16: insert (x,begin x,2);
    17: insert (x,begin x,1);
    18: 
    19: print$ empty x; endl;
    20: 
    21: proc check[c,it,rit with Reversible_Sequence[c,it,rit,int]]
    22: {
    23:   // forward iterator: forwards
    24:   var i = begin x;
    25:   whilst i != end x do
    26:     print$ *i; endl;
    27:     i++;
    28:   done;
    29: 
    30:   // forward iterator: backwards
    31:   i = end x;
    32:   whilst i != begin x do
    33:     i--;
    34:     print$ *i; endl;
    35:   done;
    36: 
    37:   // reverse iterator: forwards
    38:   var j = rbegin x;
    39:   whilst j != rend x do
    40:     print$ *j; endl;
    41:     j++;
    42:   done;
    43: 
    44:   // reverse iterator: backwards
    45:   j = rend x;
    46:   whilst j != rbegin x do
    47:     j--;
    48:     print$ *j; endl;
    49:   done;
    50: }
    51: 
    52: check [
    53:   stl_vector[int],
    54:   stl_vector_iterator[int],
    55:   stl_vector_reverse_iterator[int],
    56:   int
    57: ]();
End felix section to test/regress//stl-1.01.01-0.flx[1]
Start data section to test/regress//stl-1.01.01-0.expect[1 /1 ]
     1: true
     2: false
     3: 1
     4: 2
     5: 3
     6: 4
     7: 5
     8: 6
     9: 7
    10: 7
    11: 6
    12: 5
    13: 4
    14: 3
    15: 2
    16: 1
    17: 7
    18: 6
    19: 5
    20: 4
    21: 3
    22: 2
    23: 1
    24: 1
    25: 2
    26: 3
    27: 4
    28: 5
    29: 6
    30: 7
End data section to test/regress//stl-1.01.01-0.expect[1]