From e718f78931d4b9015255d8016d2dfb978d46361c Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Sun, 8 Dec 2013 20:08:44 -0800 Subject: [PATCH] - corrected compile warnings for unit test --- source/tests/shared_lib/graphics/model_test.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/tests/shared_lib/graphics/model_test.cpp b/source/tests/shared_lib/graphics/model_test.cpp index ae8b5a274..9c95e3dfa 100644 --- a/source/tests/shared_lib/graphics/model_test.cpp +++ b/source/tests/shared_lib/graphics/model_test.cpp @@ -52,7 +52,7 @@ public: TestBaseColorPickEntity colorPicker; // This is the max color count this algorithm supports - const int MAX_SUPPORTED_COLORS_USING_THIS_METHOD = 32767; + const int unsigned MAX_SUPPORTED_COLORS_USING_THIS_METHOD = 32767; for(unsigned int i = 0; i < MAX_SUPPORTED_COLORS_USING_THIS_METHOD; ++i) { bool duplicate = colorPicker.get_next_assign_color(colorPicker.getUniqueColorID()); CPPUNIT_ASSERT_EQUAL( false,duplicate ); @@ -62,7 +62,7 @@ public: TestBaseColorPickEntity colorPicker2; // This is a test to prove when the algorithm fails - const int MAX_SUPPORTED_COLORS_USING_THIS_METHOD_FAIL = 32768; + const int unsigned MAX_SUPPORTED_COLORS_USING_THIS_METHOD_FAIL = 32768; for(unsigned int i = 0; i < MAX_SUPPORTED_COLORS_USING_THIS_METHOD_FAIL; ++i) { bool duplicate = colorPicker2.get_next_assign_color(colorPicker2.getUniqueColorID()); CPPUNIT_ASSERT_EQUAL( (i+1 >= MAX_SUPPORTED_COLORS_USING_THIS_METHOD_FAIL),duplicate ); @@ -80,7 +80,7 @@ public: TestBaseColorPickEntity colorPicker; // This is the max color count this algorithm supports - const int MAX_SUPPORTED_COLORS_USING_THIS_METHOD = 64005; + const int unsigned MAX_SUPPORTED_COLORS_USING_THIS_METHOD = 64005; for(unsigned int i = 0; i < MAX_SUPPORTED_COLORS_USING_THIS_METHOD; ++i) { bool duplicate = colorPicker.get_next_assign_color(colorPicker.getUniqueColorID()); CPPUNIT_ASSERT_EQUAL( false,duplicate ); @@ -90,7 +90,7 @@ public: TestBaseColorPickEntity colorPicker2; // This is a test to prove when the algorithm fails - const int MAX_SUPPORTED_COLORS_USING_THIS_METHOD_FAIL = 64006; + const int unsigned MAX_SUPPORTED_COLORS_USING_THIS_METHOD_FAIL = 64006; for(unsigned int i = 0; i < MAX_SUPPORTED_COLORS_USING_THIS_METHOD_FAIL; ++i) { bool duplicate = colorPicker2.get_next_assign_color(colorPicker2.getUniqueColorID()); CPPUNIT_ASSERT_EQUAL( (i+1 >= MAX_SUPPORTED_COLORS_USING_THIS_METHOD_FAIL),duplicate );