@@ -185,48 +185,61 @@ TEST(Timeline_Check_Two_Track_Video)
185185TEST (Timeline_Clip_Order)
186186{
187187 // Create a timeline
188+ cout << " A" << endl;
188189 Timeline t (640 , 480 , Fraction (30 , 1 ), 44100 , 2 , LAYOUT_STEREO);
190+ cout << " B" << endl;
189191
190192 // Add some clips out of order
191193 stringstream path_top;
192194 path_top << TEST_MEDIA_PATH << " front3.png" ;
193195 Clip clip_top (path_top.str ());
194196 clip_top.Layer (2 );
195197 t.AddClip (&clip_top);
198+ cout << " C" << endl;
196199
197200 stringstream path_middle;
198201 path_middle << TEST_MEDIA_PATH << " front.png" ;
199202 Clip clip_middle (path_middle.str ());
200203 clip_middle.Layer (0 );
201204 t.AddClip (&clip_middle);
205+ cout << " D" << endl;
202206
203207 stringstream path_bottom;
204208 path_bottom << TEST_MEDIA_PATH << " back.png" ;
205209 Clip clip_bottom (path_bottom.str ());
206210 clip_bottom.Layer (1 );
207211 t.AddClip (&clip_bottom);
212+ cout << " E" << endl;
208213
209214 // Open Timeline
210215 t.Open ();
216+ cout << " F" << endl;
211217
212218 // Loop through Clips and check order (they should have been sorted into the correct order)
213219 // Bottom layer to top layer, then by position.
214220 list<Clip*>::iterator clip_itr;
215221 list<Clip*> clips = t.Clips ();
222+ cout << " G" << endl;
216223 int counter = 0 ;
217224 for (clip_itr=clips.begin (); clip_itr != clips.end (); ++clip_itr)
218225 {
226+ cout << " H" << endl;
219227 // Get clip object from the iterator
220228 Clip *clip = (*clip_itr);
221229
230+ cout << " I" << endl;
231+
222232 switch (counter) {
223233 case 0 :
234+ cout << " J" << endl;
224235 CHECK_EQUAL (0 , clip->Layer ());
225236 break ;
226237 case 1 :
238+ cout << " K" << endl;
227239 CHECK_EQUAL (1 , clip->Layer ());
228240 break ;
229241 case 2 :
242+ cout << " L" << endl;
230243 CHECK_EQUAL (2 , clip->Layer ());
231244 break ;
232245 }
@@ -235,6 +248,8 @@ TEST(Timeline_Clip_Order)
235248 counter++;
236249 }
237250
251+ cout << " M" << endl;
252+
238253 // Add another clip
239254 stringstream path_middle1;
240255 path_middle1 << TEST_MEDIA_PATH << " interlaced.png" ;
@@ -243,28 +258,35 @@ TEST(Timeline_Clip_Order)
243258 clip_middle1.Position (0.5 );
244259 t.AddClip (&clip_middle1);
245260
261+ cout << " N" << endl;
246262
247263 // Loop through clips again, and re-check order
248264 counter = 0 ;
249265 clips = t.Clips ();
266+ cout << " O" << endl;
250267 for (clip_itr=clips.begin (); clip_itr != clips.end (); ++clip_itr)
251268 {
252269 // Get clip object from the iterator
253270 Clip *clip = (*clip_itr);
271+ cout << " P" << endl;
254272
255273 switch (counter) {
256274 case 0 :
275+ cout << " Q" << endl;
257276 CHECK_EQUAL (0 , clip->Layer ());
258277 break ;
259278 case 1 :
279+ cout << " R" << endl;
260280 CHECK_EQUAL (1 , clip->Layer ());
261281 CHECK_CLOSE (0.0 , clip->Position (), 0.0001 );
262282 break ;
263283 case 2 :
284+ cout << " S" << endl;
264285 CHECK_EQUAL (1 , clip->Layer ());
265286 CHECK_CLOSE (0.5 , clip->Position (), 0.0001 );
266287 break ;
267288 case 3 :
289+ cout << " T" << endl;
268290 CHECK_EQUAL (2 , clip->Layer ());
269291 break ;
270292 }
@@ -273,8 +295,12 @@ TEST(Timeline_Clip_Order)
273295 counter++;
274296 }
275297
298+ cout << " U" << endl;
299+
276300 // Close reader
277301 t.Close ();
302+
303+ cout << " V" << endl;
278304}
279305
280306
0 commit comments