Fixing previous commit. Forgot to add a few files.
authorMarkus Kauppila <markus.kauppila@gmail.com>
Wed, 10 Aug 2011 17:01:22 +0300
changeset 5822 c261cbef3808
parent 5821 717e4cb840dd
child 5823 6db8267b78f9
Fixing previous commit. Forgot to add a few files.
test/test-automation/tests/testrwops/TestSupportRWops.h
test/test-automation/tests/testrwops/TestSupportRWops_Generic.c
test/test-automation/tests/testrwops/read
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/test-automation/tests/testrwops/TestSupportRWops.h	Wed Aug 10 17:01:22 2011 +0300
@@ -0,0 +1,12 @@
+#ifndef TestSupportRWops_h
+#define TestSupportRWops_h
+
+#include <stdio.h>
+#include <SDL/SDL.h>
+
+FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode);
+FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode);
+SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode);
+SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode);
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/test-automation/tests/testrwops/TestSupportRWops_Generic.c	Wed Aug 10 17:01:22 2011 +0300
@@ -0,0 +1,31 @@
+/* Generic implementation for file opening routines.
+* Customizations for specific platforms should go in alternative files.
+*/
+
+// quiet windows compiler warnings
+#define _CRT_SECURE_NO_WARNINGS
+
+#include <stdio.h>
+#include <SDL/SDL.h>
+
+#include "TestSupportRWops.h"
+
+FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode)
+{
+	return fopen(file, mode);
+}
+
+FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode)
+{
+	return fopen(file, mode);
+}
+
+SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode)
+{
+	return SDL_RWFromFile(file, mode);
+}
+
+SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode)
+{
+	return SDL_RWFromFile(file, mode);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/test-automation/tests/testrwops/read	Wed Aug 10 17:01:22 2011 +0300
@@ -0,0 +1,1 @@
+Hello World!
\ No newline at end of file