@@ -154,7 +154,7 @@ main()
154154
155155 }
156156
157- /* TestGalley Vector with fixed size stamps*/
157+ /* TestGalleySet with fixed size stamps*/
158158 {/* 19 .. 22*/
159159
160160char sample[]=" z1234567*89abcde&fghijklm" ;
@@ -170,25 +170,25 @@ main()
170170 stamps.push_back (stamp);
171171 stamps.push_back (stamp);
172172
173- GalleyVector galley (stamps);
173+ GalleySet galley (stamps);
174174
175175 std::vector<std::string> res = galley.ExtractStr (blob);
176176 std::string str;
177177 str = res[0 ];
178- is (str, expected1," GalleyVector , fixed size string stamps: First element of vector is ok" );
178+ is (str, expected1," GalleySet , fixed size string stamps: First element of vector is ok" );
179179
180180 str = res[1 ];
181- is (str, expected2," GalleyVector , fixed size string stamps: Second element of vector is ok" );
181+ is (str, expected2," GalleySet , fixed size string stamps: Second element of vector is ok" );
182182
183- is (res.size (),2 ," GalleyVector , fixed size string stamps: The vector has only two elements" );
183+ is (res.size (),2 ," GalleySet , fixed size string stamps: The vector has only two elements" );
184184
185- is (blob.Size (),strlen (sample) - res[0 ].length () - res[1 ].length ()," GalleyVector : shifts no extra bytes for fixed stamps" );
185+ is (blob.Size (),strlen (sample) - res[0 ].length () - res[1 ].length ()," GalleySet : shifts no extra bytes for fixed stamps" );
186186
187- is (galley.minSize (), stamp.minSize ()*2 ," GalleyVector , fixed size string stamps: galley min size is ok" );
188- is (galley.maxSize (), stamp.maxSize ()*2 ," GalleyVector , fixed size string stamps: galley max size is ok" );
187+ is (galley.minSize (), stamp.minSize ()*2 ," GalleySet , fixed size string stamps: galley min size is ok" );
188+ is (galley.maxSize (), stamp.maxSize ()*2 ," GalleySet , fixed size string stamps: galley max size is ok" );
189189 }
190190
191- /* Test GalleyVector with variated size stamps*/
191+ /* Test GalleySet with variated size stamps*/
192192 {/* 25 .. 30*/
193193
194194char sample[]=" z1234567*89abcde&fghijklm" ;
@@ -203,26 +203,26 @@ main()
203203 stamps.push_back (stamp);
204204 stamps.push_back (stamp);
205205
206- GalleyVector galley (stamps);
206+ GalleySet galley (stamps);
207207
208208 std::vector<std::string> res = galley.ExtractStr (blob);
209209 std::string str;
210210
211211 str = res[0 ];
212- is (str, expected1," GalleyVector , variated size string stamp: First element of vector is ok" );
212+ is (str, expected1," GalleySet , variated size string stamp: First element of vector is ok" );
213213
214214 str = res[1 ];
215- is (str, expected2," GalleyVector , variated size string stamp: Second element of vector is ok" );
215+ is (str, expected2," GalleySet , variated size string stamp: Second element of vector is ok" );
216216
217- is (res.size (),2 ," GalleyVector , variated size string stamp: The vector has only two elements" );
217+ is (res.size (),2 ," GalleySet , variated size string stamp: The vector has only two elements" );
218218
219- is (blob.Size (),strlen (sample) - res[0 ].length () - res[1 ].length () - ORACLE_SIZE*2 ," GalleyVector : shifts one oracle for each variated stamps" );
219+ is (blob.Size (),strlen (sample) - res[0 ].length () - res[1 ].length () - ORACLE_SIZE*2 ," GalleySet : shifts one oracle for each variated stamps" );
220220
221- is (galley.minSize (), stamp.minSize ()*2 + ORACLE_SIZE *2 ," GalleyVector , variated size string stamps: galley min size is ok" );
222- is (galley.maxSize (), stamp.maxSize ()*2 + ORACLE_SIZE *2 ," GalleyVector , variated size string stamps: galley max size is ok" );
221+ is (galley.minSize (), stamp.minSize ()*2 + ORACLE_SIZE *2 ," GalleySet , variated size string stamps: galley min size is ok" );
222+ is (galley.maxSize (), stamp.maxSize ()*2 + ORACLE_SIZE *2 ," GalleySet , variated size string stamps: galley max size is ok" );
223223 }
224224
225- /* Test GalleyVector with unbounded size stamps*/
225+ /* Test GalleySet with unbounded size stamps*/
226226 {/* 31 .. 36*/
227227
228228char sample[]=" z1234567*89abcde&fghijklm" ;
@@ -237,27 +237,27 @@ main()
237237 stamps.push_back (stamp);
238238 stamps.push_back (stamp);
239239
240- GalleyVector galley (stamps);
240+ GalleySet galley (stamps);
241241
242242 std::vector<std::string> res = galley.ExtractStr (blob);
243243 std::string str;
244244
245245 str = res[0 ];
246- is (str, expected1," GalleyVector , unbounded size string stamp: First element of vector is ok" );
246+ is (str, expected1," GalleySet , unbounded size string stamp: First element of vector is ok" );
247247
248248 str = res[1 ];
249- is (str, expected2," GalleyVector , unbounded size string stamp: Second element of vector is ok" );
249+ is (str, expected2," GalleySet , unbounded size string stamp: Second element of vector is ok" );
250250
251- is (res.size (),2 ," GalleyVector , unbounded size string stamp: The vector has only two elements" );
251+ is (res.size (),2 ," GalleySet , unbounded size string stamp: The vector has only two elements" );
252252
253- is (blob.Size (),0 ," GalleyVector : will use all data for unbounded stamp" );
253+ is (blob.Size (),0 ," GalleySet : will use all data for unbounded stamp" );
254254
255- is (galley.minSize (), stamp.minSize ()*2 + ORACLE_SIZE *2 ," GalleyVector , unbounded size string stamps: galley min size is ok" );
256- is (galley.maxSize (), -1 ," GalleyVector , unbounded size string stamps: galley max size is ok" );
255+ is (galley.minSize (), stamp.minSize ()*2 + ORACLE_SIZE *2 ," GalleySet , unbounded size string stamps: galley min size is ok" );
256+ is (galley.maxSize (), -1 ," GalleySet , unbounded size string stamps: galley max size is ok" );
257257
258258 }
259259
260- /* Test GalleyVector with mixed stam types*/
260+ /* Test GalleySet with mixed stam types*/
261261 {/* 37 .. 46*/
262262
263263char sample[]=" z1234567*89abcde&fghijklmnopqrstuvwxyzAB%CDEFGHIJKLMNOPQRSTUVWXYZ!" ;
@@ -284,38 +284,38 @@ main()
284284 stamps.push_back (u_stamp);
285285 stamps.push_back (f_stamp);
286286
287- GalleyVector galley (stamps);
287+ GalleySet galley (stamps);
288288
289289 std::vector<std::string> res = galley.ExtractStr (blob);
290290 std::string str;
291291
292292 str = res[0 ];
293- is (str, expected1," GalleyVector , mixed type stamps: First unbounded stamp is ok" );
293+ is (str, expected1," GalleySet , mixed type stamps: First unbounded stamp is ok" );
294294
295295 str = res[1 ];
296- is (str, expected2," GalleyVector , mixed type stamps: Fist varieded stamp is ok" );
296+ is (str, expected2," GalleySet , mixed type stamps: Fist varieded stamp is ok" );
297297
298298 str = res[2 ];
299- is (str, expected3," GalleyVector , mixed type stamps: Second variated stamp is ok" );
299+ is (str, expected3," GalleySet , mixed type stamps: Second variated stamp is ok" );
300300
301301 str = res[3 ];
302- is (str, expected4," GalleyVector , mixed type stamps: First fixed stamp is ok" );
302+ is (str, expected4," GalleySet , mixed type stamps: First fixed stamp is ok" );
303303
304304 str = res[4 ];
305- is (str, expected5," GalleyVector , mixed type stamps: Second unbounded stamp is ok" );
305+ is (str, expected5," GalleySet , mixed type stamps: Second unbounded stamp is ok" );
306306
307307 str = res[5 ];
308- is (str, expected6," GalleyVector , mixed type stamps: Second fixed stamp is ok" );
308+ is (str, expected6," GalleySet , mixed type stamps: Second fixed stamp is ok" );
309309
310- is (res.size (),6 ," GalleyVector , mixed type stamps: The vector has only six elements" );
310+ is (res.size (),6 ," GalleySet , mixed type stamps: The vector has only six elements" );
311311
312- is (blob.Size (),0 ," GalleyVector : will use all data if we have at least one unbounded stamp" );
312+ is (blob.Size (),0 ," GalleySet : will use all data if we have at least one unbounded stamp" );
313313
314- is (galley.minSize (), (f_stamp.minSize ()+v_stamp.minSize ()+u_stamp.minSize ())*2 + ORACLE_SIZE * (2 +2 +1 )," GalleyVector , mixed types stamps: galley min size is ok" );
315- is (galley.maxSize (), -1 ," GalleyVector , mixed types stamps: galley max size is ok" );
314+ is (galley.minSize (), (f_stamp.minSize ()+v_stamp.minSize ()+u_stamp.minSize ())*2 + ORACLE_SIZE * (2 +2 +1 )," GalleySet , mixed types stamps: galley min size is ok" );
315+ is (galley.maxSize (), -1 ," GalleySet , mixed types stamps: galley max size is ok" );
316316 }
317317
318- /* Test GalleyVector , single unbounded stamp will use all data with no oracle to predict it*/
318+ /* Test GalleySet , single unbounded stamp will use all data with no oracle to predict it*/
319319 {/* 47 .. 53*/
320320
321321char sample[]=" z1234567*89abcde&fghijklmnopqrstuvwxyzAB%CDEFGHIJKLMNOPQRSTUVWXYZ!" ;
@@ -335,29 +335,29 @@ main()
335335 stamps.push_back (u_stamp);
336336 stamps.push_back (f_stamp);
337337
338- GalleyVector galley (stamps);
338+ GalleySet galley (stamps);
339339
340340 std::vector<std::string> res = galley.ExtractStr (blob);
341341 std::string str;
342342
343343 str = res[0 ];
344- is (str, expected1," GalleyVector , mixed type stamps 2: First unbounded stamp is ok" );
344+ is (str, expected1," GalleySet , mixed type stamps 2: First unbounded stamp is ok" );
345345
346346 str = res[1 ];
347- is (str, expected2," GalleyVector , mixed type stamps 2: Fist varieded stamp is ok" );
347+ is (str, expected2," GalleySet , mixed type stamps 2: Fist varieded stamp is ok" );
348348
349349 str = res[2 ];
350- is (str, expected3," GalleyVector , mixed type stamps 2: Second variated stamp is ok" );
350+ is (str, expected3," GalleySet , mixed type stamps 2: Second variated stamp is ok" );
351351
352- is (res.size (),3 ," GalleyVector , mixed type stamps 2: The vector has only three elements" );
352+ is (res.size (),3 ," GalleySet , mixed type stamps 2: The vector has only three elements" );
353353
354- is (blob.Size (),0 ," GalleyVector 2: will use all data if we have at least one unbounded stamp" );
354+ is (blob.Size (),0 ," GalleySet 2: will use all data if we have at least one unbounded stamp" );
355355
356- is (galley.minSize (), f_stamp.minSize ()*2 + u_stamp.minSize () ," GalleyVector 2, mixed types stamps: galley min size is ok" );
357- is (galley.maxSize (), -1 ," GalleyVector , mixed types stamps 2: galley max size is ok" );
356+ is (galley.minSize (), f_stamp.minSize ()*2 + u_stamp.minSize () ," GalleySet 2, mixed types stamps: galley min size is ok" );
357+ is (galley.maxSize (), -1 ," GalleySet , mixed types stamps 2: galley max size is ok" );
358358 }
359359
360- /* Test GalleyVector , when there are only minimal amound of data available*/
360+ /* Test GalleySet , when there are only minimal amound of data available*/
361361 {/* 54 .. 63*/
362362
363363char sample[] =" oo" " oo" " oo" " oo" " oo" " z1" " 23" " 45" " 67" " 89" " ab" ;
@@ -383,38 +383,38 @@ main()
383383 stamps.push_back (u_stamp);
384384 stamps.push_back (f_stamp);
385385
386- GalleyVector galley (stamps);
386+ GalleySet galley (stamps);
387387
388388 std::vector<std::string> res = galley.ExtractStr (blob);
389389 std::string str;
390390
391391 str = res[0 ];
392- is (str, expected1," GalleyVector , mixed type stamps 3: First unbounded stamp is ok" );
392+ is (str, expected1," GalleySet , mixed type stamps 3: First unbounded stamp is ok" );
393393
394394 str = res[1 ];
395- is (str, expected2," GalleyVector , mixed type stamps 3: Fist varieded stamp is ok" );
395+ is (str, expected2," GalleySet , mixed type stamps 3: Fist varieded stamp is ok" );
396396
397397 str = res[2 ];
398- is (str, expected3," GalleyVector , mixed type stamps 3: Second variated stamp is ok" );
398+ is (str, expected3," GalleySet , mixed type stamps 3: Second variated stamp is ok" );
399399
400400 str = res[3 ];
401- is (str, expected4," GalleyVector , mixed type stamps 3: First fixed stamp is ok" );
401+ is (str, expected4," GalleySet , mixed type stamps 3: First fixed stamp is ok" );
402402
403403 str = res[4 ];
404- is (str, expected5," GalleyVector , mixed type stamps 3: Second unbounded stamp is ok" );
404+ is (str, expected5," GalleySet , mixed type stamps 3: Second unbounded stamp is ok" );
405405
406406 str = res[5 ];
407- is (str, expected6," GalleyVector , mixed type stamps 3: Second fixed stamp is ok" );
407+ is (str, expected6," GalleySet , mixed type stamps 3: Second fixed stamp is ok" );
408408
409- is (res.size (),6 ," GalleyVector , mixed type stamps 3: The vector has only six elements" );
409+ is (res.size (),6 ," GalleySet , mixed type stamps 3: The vector has only six elements" );
410410
411- is (blob.Size (),0 ," GalleyVector 3: will use all data if we have at least one unbounded stamp" );
411+ is (blob.Size (),0 ," GalleySet 3: will use all data if we have at least one unbounded stamp" );
412412
413- is (galley.minSize (), (f_stamp.minSize ()+v_stamp.minSize ()+u_stamp.minSize ())*2 + ORACLE_SIZE * (2 +2 +1 )," GalleyVector , mixed types stamps 3: galley min size is ok" );
414- is (galley.maxSize (), -1 ," GalleyVector , mixed types stamps 3: galley max size is ok" );
413+ is (galley.minSize (), (f_stamp.minSize ()+v_stamp.minSize ()+u_stamp.minSize ())*2 + ORACLE_SIZE * (2 +2 +1 )," GalleySet , mixed types stamps 3: galley min size is ok" );
414+ is (galley.maxSize (), -1 ," GalleySet , mixed types stamps 3: galley max size is ok" );
415415 }
416416
417- /* Test GalleyVector , when there are not enought data*/
417+ /* Test GalleySet , when there are not enought data*/
418418 {/* 64 .. 67*/
419419
420420char sample[] =" oo" " oo" " oo" " oo" " oo" " z1" " 23" " 45" " 67" " 89" " a" ;
@@ -433,24 +433,24 @@ main()
433433 stamps.push_back (u_stamp);
434434 stamps.push_back (f_stamp);
435435
436- GalleyVector galley (stamps);
436+ GalleySet galley (stamps);
437437try {
438438 std::vector<std::string> res = galley.ExtractStr (blob);
439- ok (false ," Galley Vector , not enough data" );
439+ ok (false ," GalleySet , not enough data" );
440440 }
441441catch (OutOfData)
442442 {
443- ok (true ," Galley Vector , not enough data" );
443+ ok (true ," GalleySet , not enough data" );
444444 }
445445catch (...)// Any other exeption
446446 {
447- ok (false ," Galley Vector , not enough data" );
447+ ok (false ," GalleySet , not enough data" );
448448 }
449449
450- is (blob.Size (),strlen (sample) ," GalleyVector 4: will use keep all data when applying galley fails" );
450+ is (blob.Size (),strlen (sample) ," GalleySet 4: will use keep all data when applying galley fails" );
451451
452- is (galley.minSize (), (f_stamp.minSize ()+v_stamp.minSize ()+u_stamp.minSize ())*2 + ORACLE_SIZE * (2 +2 +1 )," GalleyVector , mixed types stamps 4: galley min size is ok" );
453- is (galley.maxSize (), -1 ," GalleyVector , mixed types stamps 4: galley max size is ok" );
452+ is (galley.minSize (), (f_stamp.minSize ()+v_stamp.minSize ()+u_stamp.minSize ())*2 + ORACLE_SIZE * (2 +2 +1 )," GalleySet , mixed types stamps 4: galley min size is ok" );
453+ is (galley.maxSize (), -1 ," GalleySet , mixed types stamps 4: galley max size is ok" );
454454 }
455455 TEST_END;
456456}