@@ -29,23 +29,12 @@ main()
2929 StampTwoChars stamp;
3030 GalleySeriesgalley (stamp);
3131 Blobblob (short_sample,strlen (short_sample));
32- std::list<std::string> res = galley.ExtractStr (blob);
33-
34- std::string str;
35-
36- str = res.front ();
37- is (str, expected1," GalleySeries, fixed size string stamp: First element of shifted list is ok" );
38- res.pop_front ();
39-
40- str = res.front ();
41- is (str, expected2," GalleySeries, fixed size string stamp: Second element of shifted list is ok" );
42- res.pop_front ();
43-
44- str = res.front ();
45- is (str, expected3," GalleySeries, fixed size string stamp: Third element of shifted list is ok" );
46- res.pop_front ();
32+ std::vector<std::string> res = galley.ExtractStr (blob);
4733
48- ok (res.empty ()," GalleySeries, fixed size string stamp: The rest of the list is empty" );
34+ is (res[0 ], expected1," GalleySeries, fixed size string stamp: First element of shifted list is ok" );
35+ is (res[1 ], expected2," GalleySeries, fixed size string stamp: Second element of shifted list is ok" );
36+ is (res[2 ], expected3," GalleySeries, fixed size string stamp: Third element of shifted list is ok" );
37+ is (res.size (),3 ," GalleySeries, fixed size string stamp: res has 3 items" );
4938 }
5039/* Test Galley Sereies with unlimited size stamp*/
5140 {/* 5 .. 9*/
@@ -61,26 +50,14 @@ main()
6150 StampTwoCharsList stamp_charlist;
6251 GalleySeriesgalley (stamp_charlist);
6352
64- std::list <std::string> res = galley.ExtractStr (blob);
53+ std::vector <std::string> res = galley.ExtractStr (blob);
6554 std::string str;
6655
67- str = res.front ();
68- is (str, expected1," GalleySeries, unlimited size string stamp: First element of shifted list is ok" );
69- res.pop_front ();
70-
71- str = res.front ();
72- is (str, expected2," GalleySeries, unlimited size string stamp: Second element of shifted list is ok" );
73- res.pop_front ();
74-
75- str = res.front ();
76- is (str, expected3," GalleySeries, unlimited size string stamp: Third element of shifted list is ok" );
77- res.pop_front ();
78-
79- str = res.front ();
80- is (str, expected4," GalleySeries, unlimited size string stamp: Fourth element of shifted list is ok" );
81- res.pop_front ();
82-
83- ok (res.empty ()," GalleySeries, unlimited size string stamp: The rest of the list is empty" );
56+ is (res[0 ], expected1," GalleySeries, unlimited size string stamp: First element of shifted list is ok" );
57+ is (res[1 ], expected2," GalleySeries, unlimited size string stamp: Second element of shifted list is ok" );
58+ is (res[2 ], expected3," GalleySeries, unlimited size string stamp: Third element of shifted list is ok" );
59+ is (res[3 ], expected4," GalleySeries, unlimited size string stamp: Fourth element of shifted list is ok" );
60+ is (res.size (),4 ," GalleySeries, unlimited size string stamp: The rest of the list is empty" );
8461 }
8562
8663 {/* 10..13*/
@@ -92,27 +69,24 @@ main()
9269 StampArithm<unsigned short int > stamp;
9370 GalleySeriesgalley (stamp);
9471 Blobblob (short_sample,strlen (short_sample));
95- std::list <std::vector<char >> res = galley.ExtractBin (blob);
72+ std::vector <std::vector<char >> res = galley.ExtractBin (blob);
9673
9774 std::vector<char > v;
9875unsigned short int * data;
9976
100- v = res. front () ;
77+ v = res[ 0 ] ;
10178 data = (unsigned short int *) &v[0 ];
10279is (*data, expected1," GalleySeries, fixed size binary stamp: First element of shifted list is ok" );
103- res.pop_front ();
10480
105- v = res. front () ;
81+ v = res[ 1 ] ;
10682 data = (unsigned short int *) &v[0 ];
10783is (*data, expected2," GalleySeries, fixed size binary stamp: Second element of shifted list is ok" );
108- res.pop_front ();
10984
110- v = res. front () ;
85+ v = res[ 2 ] ;
11186 data = (unsigned short int *) &v[0 ];
11287is (*data, expected3," GalleySeries, fixed size binary stamp: Third element of shifted list is ok" );
113- res.pop_front ();
11488
115- ok (res.empty ()," GalleySeries, fixed size binary stamp:The rest of the list is empty " );
89+ is (res.size (),3 , " GalleySeries, fixed size binary stamp:result has 3 elements " );
11690 }
11791
11892/* Test Galley Sereies with variated size stamp*/
@@ -131,26 +105,15 @@ main()
131105 StampSeveralChars stamp;
132106 GalleySeriesgalley (stamp);
133107
134- std::list <std::string> res = galley.ExtractStr (blob);
108+ std::vector <std::string> res = galley.ExtractStr (blob);
135109 std::string str;
136110
137- str = res.front ();
138- is (str, expected1," GalleySeries, unlimited size string stamp: First element of shifted list is ok" );
139- res.pop_front ();
140-
141- str = res.front ();
142- is (str, expected2," GalleySeries, unlimited size string stamp: Second element of shifted list is ok" );
143- res.pop_front ();
111+ is (res[0 ], expected1," GalleySeries, unlimited size string stamp: First element of shifted list is ok" );
112+ is (res[1 ], expected2," GalleySeries, unlimited size string stamp: Second element of shifted list is ok" );
113+ is (res[2 ], expected3," GalleySeries, unlimited size string stamp: Third element of shifted list is ok" );
114+ is (res[3 ], expected4," GalleySeries, unlimited size string stamp: Fourth element of shifted list is ok" );
144115
145- str = res.front ();
146- is (str, expected3," GalleySeries, unlimited size string stamp: Third element of shifted list is ok" );
147- res.pop_front ();
148-
149- str = res.front ();
150- is (str, expected4," GalleySeries, unlimited size string stamp: Fourth element of shifted list is ok" );
151- res.pop_front ();
152-
153- ok (res.empty ()," GalleySeries, unlimited size string stamp: The rest of the list is empty" );
116+ is (res.size (),4 ," GalleySeries, unlimited size string stamp: The list has only 4 members" );
154117
155118 }
156119
@@ -242,11 +205,9 @@ main()
242205 std::vector<std::string> res = galley.ExtractStr (blob);
243206 std::string str;
244207
245- str = res[0 ];
246- is (str, expected1," GalleySet, unbounded size string stamp: First element of vector is ok" );
208+ is (res[0 ], expected1," GalleySet, unbounded size string stamp: First element of vector is ok" );
247209
248- str = res[1 ];
249- is (str, expected2," GalleySet, unbounded size string stamp: Second element of vector is ok" );
210+ is (res[1 ], expected2," GalleySet, unbounded size string stamp: Second element of vector is ok" );
250211
251212is (res.size (),2 ," GalleySet, unbounded size string stamp: The vector has only two elements" );
252213