Mercurial > fife-parpg
changeset 38:38232a42ff8d
Updated tests (loadResource instead of load). Added static fife-project to Unittest-Solution for VS9.
author | aldart@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sat, 12 Jul 2008 12:30:31 +0000 |
parents | 0d325e9d5953 |
children | 4e68022ed545 |
files | build/win32/build_environments/visual_studio_9/Fife_UnitTest.sln build/win32/build_environments/visual_studio_9/Fife_UnitTest.suo tests/core_tests/test_gui++.cpp tests/core_tests/test_images++.cpp |
diffstat | 4 files changed, 16 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/build/win32/build_environments/visual_studio_9/Fife_UnitTest.sln Sat Jul 12 12:00:57 2008 +0000 +++ b/build/win32/build_environments/visual_studio_9/Fife_UnitTest.sln Sat Jul 12 12:30:31 2008 +0000 @@ -1,7 +1,12 @@ Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Fife_UnitTest", "Fife_UnitTest.vcproj", "{CF8061DB-347A-4BEC-A63B-FBFE5BAB9D1B}" + ProjectSection(ProjectDependencies) = postProject + {96025707-5759-400D-80E5-A1E94C8A79A2} = {96025707-5759-400D-80E5-A1E94C8A79A2} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfife", "fife.vcproj", "{96025707-5759-400D-80E5-A1E94C8A79A2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,6 +18,10 @@ {CF8061DB-347A-4BEC-A63B-FBFE5BAB9D1B}.Debug|Win32.Build.0 = Debug|Win32 {CF8061DB-347A-4BEC-A63B-FBFE5BAB9D1B}.Release|Win32.ActiveCfg = Release|Win32 {CF8061DB-347A-4BEC-A63B-FBFE5BAB9D1B}.Release|Win32.Build.0 = Release|Win32 + {96025707-5759-400D-80E5-A1E94C8A79A2}.Debug|Win32.ActiveCfg = Debug_static|Win32 + {96025707-5759-400D-80E5-A1E94C8A79A2}.Debug|Win32.Build.0 = Debug_static|Win32 + {96025707-5759-400D-80E5-A1E94C8A79A2}.Release|Win32.ActiveCfg = Release_static|Win32 + {96025707-5759-400D-80E5-A1E94C8A79A2}.Release|Win32.Build.0 = Release_static|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE
--- a/tests/core_tests/test_gui++.cpp Sat Jul 12 12:00:57 2008 +0000 +++ b/tests/core_tests/test_gui++.cpp Sat Jul 12 12:30:31 2008 +0000 @@ -29,7 +29,6 @@ #include <boost/shared_ptr.hpp> #include <SDL.h> #include <guichan.hpp> -#include "../../ext/UnitTest++/src/UnitTest++.h" #include "vfs/vfs.h" #include "util/structures/rect.h" @@ -90,7 +89,7 @@ top->add(icon, 10, 30); ImageLoader provider(vfs.get()); - boost::scoped_ptr<Image> img(provider.load(ImageLocation(IMAGE_FILE))); + boost::scoped_ptr<Image> img(dynamic_cast<Image*>(provider.loadResource(ImageLocation(IMAGE_FILE)))); int h = img->getHeight(); int w = img->getWidth();
--- a/tests/core_tests/test_images++.cpp Sat Jul 12 12:00:57 2008 +0000 +++ b/tests/core_tests/test_images++.cpp Sat Jul 12 12:30:31 2008 +0000 @@ -75,7 +75,7 @@ renderbackend.createMainScreen(800, 600, 0, false); ImageLoader provider(vfs); - boost::scoped_ptr<Image> img(provider.load(ImageLocation(IMAGE_FILE))); + boost::scoped_ptr<Image> img(dynamic_cast<Image*>(provider.loadResource(ImageLocation(IMAGE_FILE)))); int h = img->getHeight(); int w = img->getWidth(); @@ -100,7 +100,7 @@ renderbackend.createMainScreen(800, 600, 0, false); ImageLoader imgprovider(vfs); - boost::scoped_ptr<Image> img(imgprovider.load(ImageLocation(SUBIMAGE_FILE))); + boost::scoped_ptr<Image> img(dynamic_cast<Image*>(imgprovider.loadResource(ImageLocation(SUBIMAGE_FILE)))); ImageLocation location(SUBIMAGE_FILE); location.setParentSource(&*img); @@ -117,7 +117,7 @@ for (int y = 0; y < (H - h); y+=h) { location.setXShift(x); location.setYShift(y); - Image* sub = subprovider.load(location); + Image* sub = dynamic_cast<Image*>(subprovider.loadResource(location)); subimages.push_back(sub); } } @@ -145,9 +145,9 @@ ImageLoader provider(env.vfs.get()); env.vfs.get()->exists(IMAGE_FILE); - boost::scoped_ptr<Image> img(provider.load(ImageLocation(IMAGE_FILE))); + boost::scoped_ptr<Image> img(dynamic_cast<Image*>(provider.loadResource(ImageLocation(IMAGE_FILE)))); env.vfs.get()->exists(ALPHA_IMAGE_FILE); - boost::scoped_ptr<Image> alpha_img(provider.load(ImageLocation(ALPHA_IMAGE_FILE))); + boost::scoped_ptr<Image> alpha_img(dynamic_cast<Image*>(provider.loadResource(ImageLocation(ALPHA_IMAGE_FILE)))); int h0 = img->getHeight(); int w0 = img->getWidth();