1 /* 2 $Id: RegionTestcase.h 4235 2003-08-06 06:46:06Z jackburton $ 3 4 This file defines a base class for performing all tests of BRegion 5 functionality. 6 7 */ 8 9 10 #ifndef RegionTestcase_H 11 #define RegionTestcase_H 12 13 14 #include "../common.h" 15 #include <List.h> 16 #include <Rect.h> 17 #include <Point.h> 18 19 20 class BRegion; 21 22 23 class RegionTestcase : 24 public TestCase { 25 26 private: 27 BList listOfRegions; 28 29 #define numPointsPerSide 17 30 BPoint pointArray[numPointsPerSide * numPointsPerSide]; 31 32 protected: 33 int GetPointsInRect(BRect, BPoint **); 34 void CheckFrame(BRegion *); 35 bool RegionsAreEqual(BRegion *, BRegion *); 36 bool RegionIsEmpty(BRegion *); 37 38 virtual void testOneRegion(BRegion *) = 0; 39 virtual void testTwoRegions(BRegion *, BRegion *) = 0; 40 41 public: 42 void PerformTest(void); 43 RegionTestcase(std::string name = ""); 44 virtual ~RegionTestcase(); 45 }; 46 47 #endif 48