Update contrib.
1 // Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\buffer\t_regn.cpp
16 // Test fixed and variable clipping regions.
18 // TRegionFix, RRegion .
20 // - Construct some expandable clipping regions, add some rectangles, check the region
21 // matches the rectangles, clear the region, add some rectangles to the region and
22 // check the region matches the rectangles.
23 // - Copy one region to another, using the Copy method and the copy constructor,
24 // and check the region matches the rectangles.
25 // - Create a some fixed clipping regions, add some rectangles, check the region
26 // matches the rectangles, clear the region, add some rectangles, and check the
27 // region matches the rectangles.
28 // - Copy one fixed region to another, using the Copy method and the copy constructor,
29 // and check the region matches the rectangles.
30 // - Test TRegionFix creation and error handling using Clear, Count, AddRect, CheckError
32 // - Test adding rectangles, via AddRect, to an RRegion object. Verify the results
33 // via the Count, BoundingRect and IsEmpty methods.
34 // - Test subtracting rectangles, via SubRect, from an RRegion object. Verify the
35 // results via the Count, BoundingRect and SubRegion methods.
36 // - Test subtracting regions, via AddRect and SubRegion, from an RRegion object.
37 // Verify the results via the Count, BoundingRect, Clear, Copy, and SubRect methods.
38 // - Test the RRegion Tidy method. Verify the results via the Count, AddRect,
39 // BoundingRect and Clear methods.
40 // - Test the RRegion CheckSpare method. Verify the results via the AddRect, Tidy,
41 // Clear and SubRect methods.
42 // - Test the RRegion Offset method. Verify the results via the AddRect, Move,
43 // Clear, IsEmpty and RectangleList methods.
44 // - Test the RRegion Intersection and Intersect methods. Verify the results via
45 // the AddRect, Count, IsEmpty and RectangleList methods.
46 // - Test the RRegion Union method. Verify the results via the AddRect, Count,
47 // Copy, Offset and BoundingRect methods.
48 // - Test the RRegion ClipRect method. Verify the results via the AddRect, Count,
49 // and BoundingRect methods.
50 // - Test the RRegion and TRgionFix Contains methods. Verify the results via the
52 // - Test the RRegion ForceError and CheckError methods. Verify the results via the
53 // AddRect, Copy, Count, SubRect, Clear and BoundingRect methods.
54 // - Test the RRegion and RRegionBuf sort method.
55 // - Construct some regions with pre-allocated buffer (RRegionBuf), add some rectangles,
56 // get a pointer to the array of rectangles defining this region and check the
57 // rectangles are as expected.
58 // Platforms/Drives/Compatibility:
60 // Assumptions/Requirement/Pre-requisites:
61 // Failures and causes:
62 // Base Port information:
68 LOCAL_D RTest test(_L("T_REGN"));
73 TestRRegion(TInt tlx, TInt tly, TInt brx, TInt bry);
82 void TestIntersection();
86 void TestIntersects();
88 void doTestSort(RRegion &aRegion);
90 void doTestRegionBuf(RRegion &aRegion);
93 void DoTestSet(TRegion** rgn,TInt rgnArraySize);
94 void CheckRectRegion(const TRegion& region,const TRect& rect);
102 TestRRegion::TestRRegion(TInt tlx, TInt tly, TInt brx, TInt bry)
104 rect[0]=TRect( tlx, tly, brx, bry);
105 rect[1]=TRect(-brx,-bry,-tlx,-tly);
106 rect[2]=TRect( tlx,-bry, brx,-tly);
107 rect[3]=TRect(-brx, tly,-tlx, bry);
108 bounds=TRect(-brx,-bry,brx,bry);
109 xrect=TRect(-(tlx/2+brx/2),-(tly/2+bry/2),tlx/2+brx/2,tly/2+bry/2);
112 void TestRRegion::CheckRectRegion(const TRegion& region,const TRect& rect)
113 // Check the region matches the rectangle
118 test(region.Count()==0);
121 test(region.Count()==1);
122 rlist=region.RectangleList();
123 test(rlist[0]==rect);
124 test(region[0]==rect);
128 void TestRRegion::DoTestSet(TRegion** rgn,TInt rgnArraySize)
131 for(index=0;index<rgnArraySize;index++)
132 rgn[index]->AddRect(rect[index]);
133 for(index=0;index<rgnArraySize;index++)
134 CheckRectRegion(*rgn[index],rect[index]);
135 for(index=0;index<rgnArraySize;index++)
138 rgn[index]->AddRect(rect[index]);
140 for(index=0;index<rgnArraySize;index++)
141 CheckRectRegion(*rgn[index],rect[index]);
144 void TestRRegion::TestSet()
148 RRegion xrgn(rect[0]);
149 CheckRectRegion(xrgn,rect[0]);
153 TRegion* prgn[5]={&rgn[0],&rgn[1],&rgn[2],&rgn[3],&rgn[4]};
154 DoTestSet(&prgn[0],(sizeof(rgn)/sizeof(rgn[0])));
155 for(index=0;index<(sizeof(rgn)/sizeof(rgn[0]));index++)
158 rgn1.Copy(rgn[index]);
159 CheckRectRegion(rgn1,rect[index]);
160 RRegion rgn2(rgn[index]);
161 CheckRectRegion(rgn2,rect[index]);
166 TRegionFix<5> rgnf[5];
167 TRegion* prgnf[5]={&rgnf[0],&rgnf[1],&rgnf[2],&rgnf[3],&rgnf[4]};
168 DoTestSet(&prgnf[0],(sizeof(rgnf)/sizeof(rgnf[0])));
169 for(index=0;index<(sizeof(rgn)/sizeof(rgn[0]));index++)
172 rgn1.Copy(rgnf[index]);
173 CheckRectRegion(rgn1,rect[index]);
174 TRegionFix<5> rgn2(rgnf[index]);
175 CheckRectRegion(rgn2,rect[index]);
179 void TestRRegion::TestRegionFix()
181 // Test TRegionFix creation and error handling
184 TRegionFix<1> rgnf(rect[0]);
185 CheckRectRegion(rgnf,rect[0]);
187 test(rgnf.Count()==0);
188 rgnf.AddRect(TRect(0,0,2,2));
189 test(rgnf.CheckError()==FALSE);
190 rgnf.AddRect(TRect(2,2,4,4)); // Should cause error, rgnf can only hold 1 rectangle
191 test(rgnf.CheckError()==TRUE && rgnf.Count()==0);
193 test(rgnf.CheckError()==FALSE && rgnf.Count()==0);
195 TRegionFix<10> rgnf2;
197 for(index=0;index<10;index++)
199 rgnf2.AddRect(TRect(index*4,0,index*4+2,10));
200 test(rgnf2.Count()==(index+1));
201 TRegionFix<10> rgnf4(rgnf2); // Test copy constructor
202 TRegionFix<10> rgnf5;
203 rgnf5=rgnf2; // Test assignment
204 test(rgnf4.Count()==(index+1));
205 for(TInt index2=0;index2<=index;index2++)
206 test(rgnf2[index2]==rgnf4[index2] && rgnf2[index2]==rgnf5[index2]);
208 rgnf2.AddRect(TRect(-10,-10,0,0)); // Should push it over the edge
209 test(rgnf2.CheckError()==TRUE && rgnf2.Count()==0);
212 for(index=0;index<4;index++)
214 rgnf3.AddRect(TRect(index*4,index*4,index*4+8,index*4+8));
216 test(rgnf3.CheckError()==TRUE);
221 test(rgnf3.Count()==(index+2));
226 void TestRRegion::TestAddRect()
231 if (!rect[0].IsEmpty())
233 for(index=0;index<4;index++)
235 for(i=0;i<=index;i++)
236 rgn.AddRect(rect[index]);
237 test(rgn.Count()==(index+1));
239 test(rgn.BoundingRect()==bounds);
240 if (!xrect.IsEmpty())
243 TInt count = rgn.Count();
244 test( (count > 4) && (count <= 9) );
248 test(rgn.Count()==1);
252 void TestRRegion::TestSubRect()
254 TRect rect1(-rect[0].iBr.iX,-rect[0].iBr.iY,rect[0].iBr.iX,rect[0].iBr.iY);
260 if (!rect[0].IsEmpty())
263 for(index=0;index<4;index++)
264 rgn.SubRect(rect[index],&subRgn);
265 if (rect[0].iTl.iX==0) // Special case region, all rects join in the middle
267 test(rgn.Count()==0);
268 test(subRgn.Count()==4);
272 test(rgn.Count()==3);
273 test(subRgn.Count()==4);
274 test(rgn.BoundingRect()==subRgn.BoundingRect());
276 test(rgn.Count()==4);
279 rgn.SubRect(rgn.BoundingRect(),&subRgn);
280 test(rgn.Count()==0);
281 rgn2.SubRegion(subRgn,&rgn);
282 test(rgn2.Count()==0);
283 subRgn.SubRegion(rgn);
284 test(subRgn.Count()==0);
292 void TestRRegion::TestSubRegion()
294 TRect rect1(-rect[0].iBr.iX,-rect[0].iBr.iY,rect[0].iBr.iX,rect[0].iBr.iY);
299 if (!rect[0].IsEmpty())
302 for(index=0;index<4;index++)
303 rgn2.AddRect(rect[index]);
304 rgn.SubRegion(rgn2,&subRgn);
305 if (rect[0].iTl.iX==0) // Special case region, all rects join in the middle
307 test(rgn.Count()==0);
308 test(subRgn.Count()==4);
312 test(rgn.Count()==3);
313 test(subRgn.Count()==4);
314 test(rgn.BoundingRect()==subRgn.BoundingRect());
318 test(rgn.Count()==4);
321 rgn.SubRect(rgn.BoundingRect(),&subRgn);
322 test(rgn.Count()==0);
323 rgn2.SubRegion(subRgn,&rgn);
324 test(rgn2.Count()==0);
325 subRgn.SubRegion(rgn);
326 test(subRgn.Count()==0);
334 void TestRRegion::TestTidy()
338 TRect const rlist[8]={ // 8 Rectangles that form a square with the centre rectangle missing
349 TRect const rect1(rlist[0].iTl.iX,rlist[0].iTl.iY,rlist[2].iBr.iX,rlist[2].iBr.iY);
350 TRect const rect2(rlist[0].iTl.iX,rlist[0].iTl.iY,rlist[7].iBr.iX,rlist[7].iBr.iY);
352 // Add 3 adjoining rectangles and tidy them
353 for(loop=0;loop<3;loop++)
354 rgn.AddRect(rlist[loop]);
355 test(rgn.Count()==3);
357 test(rgn.Count()==1);
359 // Same again but add the adjoining rectangles in reverse order
361 for(loop=2;loop>=0;loop--)
362 rgn.AddRect(rlist[loop]);
363 test(rgn.Count()==3);
365 test(rgn.Count()==1);
367 // Now add 8 rectangles that should tidy down to 4
369 for(loop=0;loop<8;loop++)
370 rgn.AddRect(rlist[loop]);
371 test(rgn.Count()==8);
373 test(rgn.Count()==4);
374 test(rgn.BoundingRect()==rect2);
377 for(loop=7;loop>=0;loop--)
378 rgn.AddRect(rlist[loop]);
379 test(rgn.Count()==8);
381 test(rgn.Count()==4);
382 test(rgn.BoundingRect()==rect2);
386 void TestRRegion::TestSpare()
388 TInt gran[5]={1,2,4,20,100};
389 RRegion rgn[5]={gran[0],gran[1],gran[2],gran[3],gran[4]};
392 TRect rect1(0,0,1,1);
395 for(index=0;index<(sizeof(rgn)/sizeof(rgn[0]));index++)
397 test(rgn[index].CheckSpare()==0);
398 rgn[index].AddRect(rect1);
399 test(rgn[index].CheckSpare()==(gran[index]-1));
401 test(rgn[index].CheckSpare()<gran[index]);
403 test(rgn[index].CheckSpare()==0);
405 for(index=0;index<(sizeof(rgn)/sizeof(rgn[0]));index++)
408 for(loop=0;loop<30;loop++)
410 rect.iTl.iX=rect.iTl.iY=loop;
411 rect.iBr.iX=rect.iBr.iY=loop+1;
412 rgn[index].AddRect(rect);
416 test(rgn[index].CheckSpare()==spare);
421 rect.iTl.iX=rect.iTl.iY=loop;
422 rect.iBr.iX=rect.iBr.iY=loop+1;
423 rgn[index].SubRect(rect);
425 test(rgn[index].CheckSpare()==spare);
428 for(index=0;index<(sizeof(rgn)/sizeof(rgn[0]));index++)
432 void TestRRegion::TestOffset()
439 for(index=0;index<(sizeof(rect)/sizeof(rect[0]));index++)
442 rgn.AddRect(rect[index]);
446 if (rect[index].IsEmpty())
447 test(rgn.Count()==0);
450 test(rgn.Count()==1);
451 rlist=rgn.RectangleList();
458 void TestRRegion::TestIntersection()
460 RRegion rgn1,rgn2,tmp_rgn;
468 for(index=0;index<(sizeof(rect)/sizeof(rect[0]));index++)
469 tmp_rgn.AddRect(rect[index]);
470 rgn2.Intersection(rgn1,tmp_rgn);
471 test(rgn2.Count()==4);
472 rlist=rgn2.RectangleList();
473 for(index=0;index<(TUint)rgn2.Count();index++)
475 test(rlist[index].iTl.iX==xrect.iTl.iX || rlist[index].iTl.iX==rect[0].iTl.iX);
476 test(rlist[index].iTl.iY==xrect.iTl.iY || rlist[index].iTl.iY==rect[0].iTl.iY);
477 test(rlist[index].iBr.iX==xrect.iBr.iX || rlist[index].iBr.iX==(-rect[0].iTl.iX));
478 test(rlist[index].iBr.iY==xrect.iBr.iY || rlist[index].iBr.iY==(-rect[0].iTl.iY));
480 rgn1.Intersect(tmp_rgn);
481 test(rgn1.Count()==4);
482 rlist=rgn1.RectangleList();
483 for(index=0;index<(TUint)rgn1.Count();index++)
485 test(rlist[index].iTl.iX==xrect.iTl.iX || rlist[index].iTl.iX==rect[0].iTl.iX);
486 test(rlist[index].iTl.iY==xrect.iTl.iY || rlist[index].iTl.iY==rect[0].iTl.iY);
487 test(rlist[index].iBr.iX==xrect.iBr.iX || rlist[index].iBr.iX==(-rect[0].iTl.iX));
488 test(rlist[index].iBr.iY==xrect.iBr.iY || rlist[index].iBr.iY==(-rect[0].iTl.iY));
496 void TestRRegion::TestUnion()
498 RRegion rgn1,rgn2,rgn3,tmp_rgn;
499 TRect bounds, rgn1Bounds;
502 // Test RRegion (always has a dynamic buffer).
506 for(index=0;index<(sizeof(rect)/sizeof(rect[0]));index++)
507 tmp_rgn.AddRect(rect[index]);
508 test(tmp_rgn.Count()==4);
510 test(rgn1.Count()==7);
511 rgn1Bounds = rgn1.BoundingRect();
517 test(rgn3.Count()==17);
518 bounds=rgn1.BoundingRect();
521 test(rgn1.BoundingRect()==bounds);
522 rgn1Bounds.Shrink(3,5);
523 rgn1Bounds.Resize(8,12);
524 test(rgn3.BoundingRect()==rgn1Bounds);
531 RRegionBuf<8> rgnBuf1,rgnBuf2,rgnBuf3,tmp_rgnBuf;
533 // Test RRegionBuf (can transform from using a static to using a dynamic buffer).
534 rgnBuf1.AddRect(xrect);
535 if (!rgnBuf1.IsEmpty())
537 for(index=0;index<(sizeof(rect)/sizeof(rect[0]));index++)
538 tmp_rgnBuf.AddRect(rect[index]);
539 test(tmp_rgnBuf.Count()==4);
540 rgnBuf1.Union(tmp_rgnBuf);
541 test(rgnBuf1.Count()==7);
542 rgn1Bounds = rgnBuf1.BoundingRect();
543 rgnBuf2.Copy(rgnBuf1);
545 rgnBuf3.Copy(rgnBuf1);
547 rgnBuf3.Union(rgnBuf2);
548 test(rgnBuf3.Count()==17);
549 bounds=rgnBuf1.BoundingRect();
550 rgnBuf1.Union(rgnBuf2);
552 test(rgnBuf1.BoundingRect()==bounds);
553 rgn1Bounds.Shrink(3,5);
554 rgn1Bounds.Resize(8,12);
555 test(rgnBuf3.BoundingRect()==rgn1Bounds);
563 void TestRRegion::TestClipRect()
569 for(index=0;index<(sizeof(rect)/sizeof(rect[0]));index++)
570 rgn1.AddRect(rect[index]);
571 TRect clip=rgn1.BoundingRect();
573 test(clip==rgn1.BoundingRect());
579 test(clip==rgn1.BoundingRect());
580 clip.iTl.iX=clip.iBr.iX;
582 test(rgn1.Count()==0);
587 void TestRRegion::TestContains()
590 rgn.AddRect(TRect(10,10,20,20));
591 rgn.AddRect(TRect(10,20,50,30));
592 test(rgn.Contains(TPoint(10,10)));
593 test(rgn.Contains(TPoint(49,29)));
594 test(rgn.Contains(TPoint(15,15)));
595 test(rgn.Contains(TPoint(31,22)));
596 test(rgn.Contains(TPoint(50,30))==EFalse);
597 test(rgn.Contains(TPoint(-100,-30))==EFalse);
598 test(rgn.Contains(TPoint(200,20))==EFalse);
599 test(rgn.Contains(TPoint(15,30000))==EFalse);
601 TRegionFix<1> rgn2(TRect(20,20,25,25));
602 test(rgn2.Contains(TPoint(20,20)));
603 test(rgn2.Contains(TPoint(22,23)));
604 test(rgn2.Contains(TPoint(0,0))==EFalse);
605 test(rgn2.Contains(TPoint(25,25))==EFalse);
606 test(rgn2.Contains(TPoint(30,30))==EFalse);
609 void TestRRegion::TestIntersects()
612 rgn.AddRect(TRect(10,10,20,20));
613 rgn.AddRect(TRect(10,20,50,30));
614 test(rgn.Intersects(TRect(10,10,20,20)));
615 test(rgn.Intersects(TRect(5,5,15,15)));
616 test(rgn.Intersects(TRect(10,20,50,30)));
617 test(rgn.Intersects(TRect(10,10,20,20)));
618 test(rgn.Intersects(TRect(40,10,60,30)));
619 test(rgn.Intersects(TRect(0,0,10,10))==EFalse);
620 test(rgn.Intersects(TRect(30,10,40,20))==EFalse);
622 TRegionFix<1> rgn2(TRect(20,20,30,30));
623 test(rgn2.Intersects(TRect(20,20,30,30)));
624 test(rgn2.Intersects(TRect(15,25,25,35)));
625 test(rgn2.Intersects(TRect(25,15,35,25)));
626 test(rgn2.Intersects(TRect(15,15,25,25)));
627 test(rgn2.Intersects(TRect(25,25,35,35)));
628 test(rgn2.Intersects(TRect(10,20,20,30))==EFalse);
629 test(rgn2.Intersects(TRect(30,20,40,30))==EFalse);
630 test(rgn2.Intersects(TRect(20,10,30,20))==EFalse);
631 test(rgn2.Intersects(TRect(20,30,30,40))==EFalse);
633 test(rgn2.Intersects(TRect(30,30,20,20))==EFalse);
634 TRegionFix<1> rgn3(TRect(30,30,20,20));
635 test(rgn3.Intersects(TRect(30,30,20,20))==EFalse);
636 test(rgn3.Intersects(TRect(20,20,30,30))==EFalse);
639 void TestRRegion::TestErrors()
641 RRegion rgnErr,rgnErr2;
643 TRect rect(1,2,3,4),rect2;
650 test(rgnErr.CheckError()==EFalse);
651 test(rgnErr.Count()==1);
654 test(rgnErr.CheckError()==TRUE);
655 rgnErr.AddRect(rect);
656 rgnErr.AddRect(TRect(2,3,4,5));
657 test(rgnErr.CheckError()==TRUE);
658 rgnErr.SubRect(rect);
659 test(rgnErr.CheckError()==TRUE);
661 test(rgn.CheckError()==TRUE);
664 test(rgnErr.CheckError()==TRUE);
667 test(rgn.CheckError()==TRUE);
668 rgnErr.AddRect(rect);
669 test(rgnErr.CheckError()==TRUE);
673 test(rgnErr.CheckError()==TRUE);
675 test(rgn.CheckError()==FALSE);
678 rgnErr2.AddRect(rect);
679 rgn.Intersection(rgnErr,rgnErr2);
680 test(rgn.CheckError()==TRUE);
682 rgn.Intersection(rgnErr2,rgnErr);
683 test(rgn.CheckError()==TRUE);
684 rgnErr2.ForceError();
686 rgn.Intersection(rgnErr2,rgnErr);
687 test(rgn.CheckError()==TRUE);
690 rgn.Intersect(rgnErr);
691 test(rgn.CheckError()==TRUE);
694 rgnErr.Intersect(rgn);
695 test(rgnErr.CheckError()==TRUE);
696 test(rgn.CheckError()==FALSE);
698 test(rgnErr.IsEmpty()==FALSE);
702 rgn.SubRegion(rgnErr);
703 test(rgn.CheckError()==TRUE);
704 test(rgnErr.CheckError()==TRUE);
706 rgnErr.ClipRect(rect);
707 test(rgnErr.CheckError()==TRUE);
709 test(rgnErr.CheckError()==TRUE);
710 rect2=rgnErr.BoundingRect();
711 test(rect2.iTl.iX==0 && rect2.iBr.iY==0);
713 test(rgnErr.Count()==0);
714 rList=rgnErr.RectangleList();
720 void TestRRegion::doTestSort(RRegion &rgn)
723 TRect const rlist[8]={ // 8 Rectangles that form a square with the centre rectangle missing
736 // Work out wot the sorted list should be
737 for(loop=0;loop<8;loop++)
738 sorted[loop]=rlist[loop];
739 for(loop=0;loop<8;loop++)
742 for(loop2=loop+1;loop2<8;loop2++)
744 if (sorted[loop2].iTl.iY>sorted[loop].iTl.iY)
746 if (sorted[loop2].iTl.iY==sorted[loop].iTl.iY && sorted[loop2].iTl.iX>sorted[loop].iTl.iX)
749 sorted[loop]=sorted[loop2];
754 for(loop=0;loop<8;loop++)
755 rgn.AddRect(rlist[loop]);
757 plist=rgn.RectangleList();
758 for(loop=0;loop<8;loop++)
759 test(plist[loop]==sorted[loop]);
763 void TestRRegion::TestSort()
767 RRegionBuf<1> rgnBuf;
771 void TestRRegion::doTestRegionBuf(RRegion &aRegion)
773 for(TInt index=0;index<8;index++)
775 aRegion.AddRect(TRect(index*2,index*2,index*2+2,index*2+2));
776 test(aRegion.Count()==(index+1));
777 const TRect *pr=aRegion.RectangleList();
778 for(TInt index2=0;index2<=index;index2++)
779 test(pr[index2]==TRect(index2*2,index2*2,index2*2+2,index2*2+2));
784 void TestRRegion::TestRegionBuf()
786 RRegionBuf<1> rgn(TRect(1,2,3,4));
787 test(rgn[0]==TRect(1,2,3,4));
789 doTestRegionBuf(rgn1);
791 doTestRegionBuf(rgn2);
793 doTestRegionBuf(rgn5);
794 RRegionBuf<10> rgn10;
795 doTestRegionBuf(rgn10);
798 // Top level test code
799 LOCAL_C void test_region(TestRRegion t)
801 test.Start(_L("Setting values"));
803 test.Next(_L("TRegionFix"));
805 test.Next(_L("AddRect"));
807 test.Next(_L("SubRect"));
809 test.Next(_L("SubRegion"));
811 test.Next(_L("Tidy"));
813 test.Next(_L("Spare"));
815 test.Next(_L("Offset"));
817 test.Next(_L("Intersection"));
818 t.TestIntersection();
819 test.Next(_L("Union"));
821 test.Next(_L("Clip rect"));
823 test.Next(_L("Contains"));
825 test.Next(_L("Intersects"));
827 test.Next(_L("Errors"));
829 test.Next(_L("Sort"));
831 test.Next(_L("RegionBuf"));
836 GLDEF_C TInt E32Main()
844 TestRRegion t1(10,20,30,40);
845 TestRRegion t2(0,0,1,1);
846 TestRRegion t3(1,1,1,1);
847 TestRRegion t4(1000000,2000000,3000000,4000000);
849 test.Start(_L("class RRegion 1"));
851 test.Next(_L("class RRegion 2"));
853 test.Next(_L("class RRegion 3"));
855 test.Next(_L("class RRegion 4"));