Added empty test suite for testing rwops.
authorMarkus Kauppila <markus.kauppila@gmail.com>
Thu, 04 Aug 2011 20:45:12 +0300
changeset 5800 21f2e4d6fb01
parent 5799 75098354c725
child 5801 9f53e634c622
Added empty test suite for testing rwops.
test/test-automation/Makefile.am
test/test-automation/build-scripts/install-tests.sh
test/test-automation/configure.ac
test/test-automation/fuzzer/fuzzer.c
test/test-automation/testrwops/Makefile.am
test/test-automation/testrwops/testrwops.c
--- a/test/test-automation/Makefile.am	Thu Aug 04 20:17:21 2011 +0300
+++ b/test/test-automation/Makefile.am	Thu Aug 04 20:45:12 2011 +0300
@@ -1,6 +1,6 @@
 ACLOCAL_AMFLAGS = -I acinclude -I build-scripts
 
-SUBDIRS = testdummy testrect testplatform testaudio testsurface
+SUBDIRS = testdummy testrect testplatform testaudio testsurface testrwops
 runnerdir = .
 
 bin_PROGRAMS = runner
--- a/test/test-automation/build-scripts/install-tests.sh	Thu Aug 04 20:17:21 2011 +0300
+++ b/test/test-automation/build-scripts/install-tests.sh	Thu Aug 04 20:45:12 2011 +0300
@@ -16,7 +16,7 @@
 fi
 
 # TODO: put the test in an array
-for suite in "testdummy" "testplatform" "testrect" "testaudio" "testsurface"
+for suite in "testdummy" "testplatform" "testrect" "testaudio" "testsurface" "testrwops"
 do
 	cp -f "$suite/.libs/lib$suite.$EXT" $DIRECTORY
 done
--- a/test/test-automation/configure.ac	Thu Aug 04 20:17:21 2011 +0300
+++ b/test/test-automation/configure.ac	Thu Aug 04 20:45:12 2011 +0300
@@ -37,7 +37,8 @@
 				 testrect/Makefile
 				 testplatform/Makefile
 				 testaudio/Makefile
-				 testsurface/Makefile])
+				 testsurface/Makefile
+				 testrwops/Makefile])
 AC_OUTPUT
 
 echo ""
--- a/test/test-automation/fuzzer/fuzzer.c	Thu Aug 04 20:17:21 2011 +0300
+++ b/test/test-automation/fuzzer/fuzzer.c	Thu Aug 04 20:45:12 2011 +0300
@@ -196,7 +196,7 @@
 			tempBuf[index++] = boundary1 - 1;
 		}
 
-		if(boundary2 < maxValue) {
+		if(boundary2 < maxValue && boundary2 < UINT64_MAX) {
 			tempBuf[index++] = boundary2 + 1;
 		}
 	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/test-automation/testrwops/Makefile.am	Thu Aug 04 20:45:12 2011 +0300
@@ -0,0 +1,4 @@
+lib_LTLIBRARIES = libtestrwops.la
+libtestrwops_la_SOURCES = testrwops.c
+libtestrwops_la_CLAGS = -fPIC -g
+libtestrwops_la_LDFLAGS = `sdl-config --libs` -I ../.libs/libtest.la
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/test-automation/testrwops/testrwops.c	Thu Aug 04 20:45:12 2011 +0300
@@ -0,0 +1,39 @@
+/**
+ * Original code: automated SDL platform test written by Edgar Simo "bobbens"
+ * Extended and updated by aschiffler at ferzkopp dot net
+ */
+
+#include <stdio.h>
+
+#include <SDL/SDL.h>
+
+#include "../SDL_test.h"
+
+
+
+/*!
+ * Note: Port tests from "/test/automated/rwops" here
+ *
+ */
+
+/* Test cases */
+static const TestCaseReference test1 =
+		(TestCaseReference){ "rwops_test", "rwopsy", TEST_ENABLED, 0, 0 };
+
+/* Test suite */
+extern const TestCaseReference *testSuite[] =  {
+	&test1, NULL
+};
+
+TestCaseReference **QueryTestSuite() {
+	return (TestCaseReference **)testSuite;
+}
+
+/**
+ * @brief Document test case here
+ */
+int
+rwops_test(void *arg)
+{
+	AssertPass("");
+}