# HG changeset patch # User aldart@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1215865831 0 # Node ID 38232a42ff8dda9c1643bb9661fd0dba0a1d0309 # Parent 0d325e9d5953effcb2642c7f81f90eadb6d96784 Updated tests (loadResource instead of load). Added static fife-project to Unittest-Solution for VS9. diff -r 0d325e9d5953 -r 38232a42ff8d build/win32/build_environments/visual_studio_9/Fife_UnitTest.sln --- 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 diff -r 0d325e9d5953 -r 38232a42ff8d build/win32/build_environments/visual_studio_9/Fife_UnitTest.suo Binary file build/win32/build_environments/visual_studio_9/Fife_UnitTest.suo has changed diff -r 0d325e9d5953 -r 38232a42ff8d tests/core_tests/test_gui++.cpp --- 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 #include #include -#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 img(provider.load(ImageLocation(IMAGE_FILE))); + boost::scoped_ptr img(dynamic_cast(provider.loadResource(ImageLocation(IMAGE_FILE)))); int h = img->getHeight(); int w = img->getWidth(); diff -r 0d325e9d5953 -r 38232a42ff8d tests/core_tests/test_images++.cpp --- 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 img(provider.load(ImageLocation(IMAGE_FILE))); + boost::scoped_ptr img(dynamic_cast(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 img(imgprovider.load(ImageLocation(SUBIMAGE_FILE))); + boost::scoped_ptr img(dynamic_cast(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(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 img(provider.load(ImageLocation(IMAGE_FILE))); + boost::scoped_ptr img(dynamic_cast(provider.loadResource(ImageLocation(IMAGE_FILE)))); env.vfs.get()->exists(ALPHA_IMAGE_FILE); - boost::scoped_ptr alpha_img(provider.load(ImageLocation(ALPHA_IMAGE_FILE))); + boost::scoped_ptr alpha_img(dynamic_cast(provider.loadResource(ImageLocation(ALPHA_IMAGE_FILE)))); int h0 = img->getHeight(); int w0 = img->getWidth();