diff options
Diffstat (limited to '')
-rw-r--r-- | test/base/image.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/test/base/image.cpp b/test/base/image.cpp index 50fb50b0..e9e9d3d4 100644 --- a/test/base/image.cpp +++ b/test/base/image.cpp @@ -28,7 +28,7 @@ #include <exception> #include <cppunit/extensions/HelperMacros.h> -#include <log4cxx/logger.h> +#include <log4cpp/Category.hh> #include <SDL/SDL.h> @@ -43,7 +43,7 @@ namespace usdx CPPUNIT_TEST_EXCEPTION(testNotAnImage, usdx::ImageLoadException); CPPUNIT_TEST_SUITE_END(); private: - static log4cxx::LoggerPtr log; + static log4cpp::Category& log; public: void setUp() { @@ -57,7 +57,8 @@ namespace usdx { Image img("./testdata/test.bmp"); const SDL_Surface *surface = img.get_surface(); - LOG4CXX_DEBUG(log, "test.bmp: w = " << surface->w << "; h = " << surface->h); + log << log4cpp::Priority::DEBUG << "test.bmp: " << + "w = " << surface->w << "; h = " << surface->h; CPPUNIT_ASSERT(40 == surface->w); CPPUNIT_ASSERT(30 == surface->h); } @@ -66,7 +67,8 @@ namespace usdx { Image img("./testdata/test.jpg"); const SDL_Surface *surface = img.get_surface(); - LOG4CXX_DEBUG(log, "test.jpg: w = " << surface->w << "; h = " << surface->h); + log << log4cpp::Priority::DEBUG << "test.jpg: " << + "w = " << surface->w << "; h = " << surface->h; CPPUNIT_ASSERT(40 == surface->w); CPPUNIT_ASSERT(30 == surface->h); } @@ -75,7 +77,8 @@ namespace usdx { Image img("./testdata/test.png"); const SDL_Surface *surface = img.get_surface(); - LOG4CXX_DEBUG(log, "test.png: w = " << surface->w << "; h = " << surface->h); + log << log4cpp::Priority::DEBUG << "test.png: " << + "w = " << surface->w << "; h = " << surface->h; CPPUNIT_ASSERT(40 == surface->w); CPPUNIT_ASSERT(30 == surface->h); } @@ -84,7 +87,8 @@ namespace usdx { Image img("./testdata/test.gif"); const SDL_Surface *surface = img.get_surface(); - LOG4CXX_DEBUG(log, "test.gif: w = " << surface->w << "; h = " << surface->h); + log << log4cpp::Priority::DEBUG << "test.gif: " << + "w = " << surface->w << "; h = " << surface->h; CPPUNIT_ASSERT(40 == surface->w); CPPUNIT_ASSERT(30 == surface->h); } @@ -93,12 +97,13 @@ namespace usdx { Image img("./testdata/testsong_correct.txt"); const SDL_Surface *surface = img.get_surface(); - LOG4CXX_DEBUG(log, "testsong_correct.txt: w = " << surface->w << "; h = " << surface->h); + log << log4cpp::Priority::DEBUG << "testsong_correct.txt: " << + "w = " << surface->w << "; h = " << surface->h; } }; - log4cxx::LoggerPtr ImageTest::log = - log4cxx::Logger::getLogger("test.usdx.base.image"); + log4cpp::Category& ImageTest::log = + log4cpp::Category::getInstance("test.usdx.base.image"); CPPUNIT_TEST_SUITE_REGISTRATION(ImageTest); }; |