aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tests/testRectangleUtil.cc12
-rw-r--r--src/tests/texturetest.cc4
2 files changed, 7 insertions, 9 deletions
diff --git a/src/tests/testRectangleUtil.cc b/src/tests/testRectangleUtil.cc
index 2da2a4e..455f124 100644
--- a/src/tests/testRectangleUtil.cc
+++ b/src/tests/testRectangleUtil.cc
@@ -35,12 +35,11 @@ int test_insideBorder() {
35 { { 0, 0, 10, 10 }, 20, 20, 2, false } // outside for sure 35 { { 0, 0, 10, 10 }, 20, 20, 2, false } // outside for sure
36 }; 36 };
37 37
38 int i; 38 for (unsigned int i = 0; i < sizeof(tests)/sizeof(_t); ++i) {
39 for (i = 0; i < sizeof(tests)/sizeof(_t); ++i) {
40 const _t& t = tests[i]; 39 const _t& t = tests[i];
41 int result = RectangleUtil::insideBorder<Rect>(t.rect, t.x, t.y, t.bw); 40 int result = RectangleUtil::insideBorder<Rect>(t.rect, t.x, t.y, t.bw);
42 41
43 printf(" %d: is (%02d|%02d) inside [%d %d]-[%d %d] with border %d: %s, %s\n", 42 printf(" %u: is (%02d|%02d) inside [%d %d]-[%d %d] with border %d: %s, %s\n",
44 i, 43 i,
45 t.x, t.y, 44 t.x, t.y,
46 t.rect.x(), t.rect.y(), 45 t.rect.x(), t.rect.y(),
@@ -66,11 +65,11 @@ int test_overlapRectangles() {
66 }; 65 };
67 66
68 struct _test { 67 struct _test {
69 bool operator()(const Rect& a, const Rect& b, int truth, int i) { 68 bool operator()(const Rect& a, const Rect& b, int truth, unsigned int i) {
70 69
71 int result = RectangleUtil::overlapRectangles(a, b); 70 int result = RectangleUtil::overlapRectangles(a, b);
72 71
73 printf(" %d: [%2d %2d]-[%2d %2d] %s [%2d %2d]-[%2d %2d]: %s\n", 72 printf(" %u: [%2d %2d]-[%2d %2d] %s [%2d %2d]-[%2d %2d]: %s\n",
74 i, 73 i,
75 a.x(), a.y(), 74 a.x(), a.y(),
76 a.x() + (int)a.width(), 75 a.x() + (int)a.width(),
@@ -100,8 +99,7 @@ int test_overlapRectangles() {
100 99
101 100
102 _test test; 101 _test test;
103 int i; 102 for (unsigned int i = 0; i < sizeof(tests)/sizeof(_t); ++i) {
104 for (i = 0; i < sizeof(tests)/sizeof(_t); ++i) {
105 test(tests[i].a, tests[i].b, tests[i].truth, i); 103 test(tests[i].a, tests[i].b, tests[i].truth, i);
106 test(tests[i].b, tests[i].a, tests[i].truth, i); 104 test(tests[i].b, tests[i].a, tests[i].truth, i);
107 } 105 }
diff --git a/src/tests/texturetest.cc b/src/tests/texturetest.cc
index 93680c0..3736493 100644
--- a/src/tests/texturetest.cc
+++ b/src/tests/texturetest.cc
@@ -79,8 +79,8 @@ private:
79 m_gc.setForeground(Color("black", screenNumber())); 79 m_gc.setForeground(Color("black", screenNumber()));
80 80
81 const int step_size = m_box_size + 5; 81 const int step_size = m_box_size + 5;
82 int next_x = 5; 82 unsigned int next_x = 5;
83 int next_y = 5; 83 unsigned int next_y = 5;
84 84
85 TestTheme tm(screenNumber()); 85 TestTheme tm(screenNumber());
86 std::auto_ptr<ThemeItem<Texture> > text; 86 std::auto_ptr<ThemeItem<Texture> > text;