Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added test suites testevent and testkeyboard.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkauppila committed Aug 9, 2011
1 parent 42c0ca2 commit b774544
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 3 deletions.
6 changes: 4 additions & 2 deletions test/test-automation/Makefile.am
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion test/test-automation/build-scripts/install-tests.sh
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions test/test-automation/configure.ac
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions 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
34 changes: 34 additions & 0 deletions 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("");
}
4 changes: 4 additions & 0 deletions 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
34 changes: 34 additions & 0 deletions 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("");
}

0 comments on commit b774544

Please sign in to comment.