diff tests/core_tests/test_gui.cpp @ 85:35f6cfea565e

Fixed the unit tests so they will now compile and link with msvc2005. There are still a couple more changes needed to run them correctly.
author vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 19 Jul 2008 04:56:28 +0000
parents 90005975cdbb
children 64738befdf3b
line wrap: on
line diff
--- a/tests/core_tests/test_gui.cpp	Fri Jul 18 21:07:03 2008 +0000
+++ b/tests/core_tests/test_gui.cpp	Sat Jul 19 04:56:28 2008 +0000
@@ -112,7 +112,7 @@
 	RenderBackendSDL renderbackend;
 	renderbackend.init();
 	ImagePool pool;
-	Image* screen = renderbackend.createMainScreen(800, 600, 0, false);
+	Image* screen = renderbackend.createMainScreen(800, 600, 0, false, "FIFE", "");
 	SdlGuiGraphics graphics(pool);
 	graphics.setTarget(screen->getSurface());
 	test_gui_image(renderbackend, graphics, pool);
@@ -124,11 +124,18 @@
 	RenderBackendOpenGL renderbackend;
 	renderbackend.init();
 	ImagePool pool;
-	renderbackend.createMainScreen(800, 600, 0, false);
+	renderbackend.createMainScreen(800, 600, 0, false, "FIFE", "");
 	OpenGLGuiGraphics graphics(pool);
 	test_gui_image(renderbackend, graphics, pool);
 }
 
-int main() {
+// need this here because SDL redefines 
+// main to SDL_main in SDL_main.h
+#ifdef main
+#undef main
+#endif
+
+int main()
+{
 	return UnitTest::RunAllTests();
 }