From 04ff51483f4d0a24e01de24501874c6fdba1ab82 Mon Sep 17 00:00:00 2001 From: Markus Kauppila <markus.kauppila@gmail.com> Date: Tue, 9 Aug 2011 18:40:14 +0300 Subject: [PATCH] Added test suites testevent and testkeyboard. --- test/test-automation/Makefile.am | 6 ++-- .../build-scripts/install-tests.sh | 2 +- test/test-automation/configure.ac | 2 ++ .../tests/testevents/Makefile.am | 4 +++ .../tests/testevents/testevents.c | 34 +++++++++++++++++++ .../tests/testkeyboard/Makefile.am | 4 +++ .../tests/testkeyboard/testkeyboard.c | 34 +++++++++++++++++++ 7 files changed, 83 insertions(+), 3 deletions(-) create mode 100644 test/test-automation/tests/testevents/Makefile.am create mode 100644 test/test-automation/tests/testevents/testevents.c create mode 100644 test/test-automation/tests/testkeyboard/Makefile.am create mode 100644 test/test-automation/tests/testkeyboard/testkeyboard.c diff --git a/test/test-automation/Makefile.am b/test/test-automation/Makefile.am index f141cad9..9e3fce2d 100644 --- a/test/test-automation/Makefile.am +++ b/test/test-automation/Makefile.am @@ -11,8 +11,10 @@ SUBDIRS = src/libSDLtest \ tests/testrender \ tests/testvideo \ tests/testsyswm \ - tests/testclipboard - + tests/testclipboard \ + tests/testevents \ + tests/testkeyboard + ##all-local: install install: install-runner install-tests install-runner: diff --git a/test/test-automation/build-scripts/install-tests.sh b/test/test-automation/build-scripts/install-tests.sh index 911aaf3c..0fb441e0 100755 --- a/test/test-automation/build-scripts/install-tests.sh +++ b/test/test-automation/build-scripts/install-tests.sh @@ -15,7 +15,7 @@ elif [[ $PLATFORM == "Darwin" ]]; then fi # TODO: put the test in an array -for suite in "testdummy" "testplatform" "testrect" "testaudio" "testsurface" "testrwops" "testrender" "testvideo" "testsyswm" "testclipboard" +for suite in "testdummy" "testplatform" "testrect" "testaudio" "testsurface" "testrwops" "testrender" "testvideo" "testsyswm" "testclipboard" "testevents" "testkeyboard" do cp -f "$DIRECTORY/$suite/.libs/lib$suite.$EXT" $DIRECTORY done diff --git a/test/test-automation/configure.ac b/test/test-automation/configure.ac index bef1e915..bc24d941 100644 --- a/test/test-automation/configure.ac +++ b/test/test-automation/configure.ac @@ -44,6 +44,8 @@ AC_CONFIG_FILES([Makefile tests/testvideo/Makefile tests/testsyswm/Makefile tests/testclipboard/Makefile + tests/testevents/Makefile + tests/testkeyboard/Makefile tests/testrender/Makefile]) AC_OUTPUT diff --git a/test/test-automation/tests/testevents/Makefile.am b/test/test-automation/tests/testevents/Makefile.am new file mode 100644 index 00000000..3f545ee0 --- /dev/null +++ b/test/test-automation/tests/testevents/Makefile.am @@ -0,0 +1,4 @@ +lib_LTLIBRARIES = libtestevents.la +libtestevents_la_SOURCES = testevents.c +libtestevents_la_CLAGS = -fPIC -g +libtestevents_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testevents/testevents.c b/test/test-automation/tests/testevents/testevents.c new file mode 100644 index 00000000..bdb7f089 --- /dev/null +++ b/test/test-automation/tests/testevents/testevents.c @@ -0,0 +1,34 @@ +#include <stdio.h> + +#include <SDL/SDL.h> + +#include "../../include/SDL_test.h" + + + +/*! + * Note: Add test for events here + * + */ + +/* Test cases */ +static const TestCaseReference test1 = + (TestCaseReference){ "events_test", "description", TEST_DISABLED, 0, 0 }; + +/* Test suite */ +extern const TestCaseReference *testSuite[] = { + &test1, NULL +}; + +TestCaseReference **QueryTestSuite() { + return (TestCaseReference **)testSuite; +} + +/** + * @brief Document test case here + */ +int +events_test(void *arg) +{ + AssertPass(""); +} diff --git a/test/test-automation/tests/testkeyboard/Makefile.am b/test/test-automation/tests/testkeyboard/Makefile.am new file mode 100644 index 00000000..4becf49c --- /dev/null +++ b/test/test-automation/tests/testkeyboard/Makefile.am @@ -0,0 +1,4 @@ +lib_LTLIBRARIES = libtestkeyboard.la +libtestkeyboard_la_SOURCES = testkeyboard.c +libtestkeyboard_la_CLAGS = -fPIC -g +libtestkeyboard_la_LDFLAGS = `sdl-config --libs` -I ../../src/libSDLtest/.libs/libSDLtest.la diff --git a/test/test-automation/tests/testkeyboard/testkeyboard.c b/test/test-automation/tests/testkeyboard/testkeyboard.c new file mode 100644 index 00000000..341e3944 --- /dev/null +++ b/test/test-automation/tests/testkeyboard/testkeyboard.c @@ -0,0 +1,34 @@ +#include <stdio.h> + +#include <SDL/SDL.h> + +#include "../../include/SDL_test.h" + + + +/*! + * Note: Add test for keyboard here + * + */ + +/* Test cases */ +static const TestCaseReference test1 = + (TestCaseReference){ "keyboard_test", "description", TEST_DISABLED, 0, 0 }; + +/* Test suite */ +extern const TestCaseReference *testSuite[] = { + &test1, NULL +}; + +TestCaseReference **QueryTestSuite() { + return (TestCaseReference **)testSuite; +} + +/** + * @brief Document test case here + */ +int +keyboard_test(void *arg) +{ + AssertPass(""); +} -- 2.18.1