Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
d9ce7a4a
Commit
d9ce7a4a
authored
Jun 06, 2011
by
Markus Kauppila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted libtest to a more proper dummy test suite (libtestdummy).
parent
6346ed9c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
556 deletions
+31
-556
Makefile.am
test/test-automation/Makefile.am
+5
-4
configure.ac
test/test-automation/configure.ac
+2
-1
runner.c
test/test-automation/runner.c
+3
-3
Makefile.am
test/test-automation/testdummy/Makefile.am
+9
-0
testdummy.c
test/test-automation/testdummy/testdummy.c
+12
-6
Makefile.in
test/test-automation/testrect/Makefile.in
+0
-533
Makefile.am
test/test-automation/tests/Makefile.am
+0
-9
No files found.
test/test-automation/Makefile.am
View file @
d9ce7a4a
ACLOCAL_AMFLAGS
=
-I
acinclude
-I
build-scripts
SUBDIRS
=
test
s
testrect
SUBDIRS
=
test
dummy
testrect
bin_PROGRAMS
=
runner
runner_SOURCES
=
runner.c SDL_test.c
...
...
@@ -9,12 +9,13 @@ runner_LDFLAGS = `sdl-config --libs`
install
:
install-tests
install-tests
:
-
cp
-f
tests/.libs/
*
.dylib tests/ 2> /dev/null
-
cp
-f
tests/.libs/
*
.so tests/ 2> /dev/null
-
mkdir
tests
-
cp
-f
testdummy/.libs/
*
.dylib tests/ 2> /dev/null
-
cp
-f
testdummy/.libs/
*
.so tests/ 2> /dev/null
-
cp
-f
testrect/.libs/
*
.dylib tests/ 2> /dev/null
-
cp
-f
testrect/.libs/
*
.so tests/ 2> /dev/null
distclean-local
:
-
rm
-Rf
docs/
-
rm
-Rf
tests/
docs/
test/test-automation/configure.ac
View file @
d9ce7a4a
...
...
@@ -33,7 +33,8 @@ CFLAGS="-g"
AC_FUNC_FORK
AC_CONFIG_FILES([Makefile
tests/Makefile testrect/Makefile])
testdummy/Makefile
testrect/Makefile])
AC_OUTPUT
echo ""
...
...
test/test-automation/runner.c
View file @
d9ce7a4a
...
...
@@ -53,9 +53,9 @@ char selected_suite_name[NAME_BUFFER_SIZE];
//!< Temporary array to hold test suite names
#if defined(linux) || defined( __linux)
char
*
testSuites
[]
=
{
"tests/libtest.so"
,
"tests/libtestrect.so"
,
NULL
};
char
*
testSuites
[]
=
{
"tests/libtest
dummy
.so"
,
"tests/libtestrect.so"
,
NULL
};
#else
char
*
testSuites
[]
=
{
"tests/libtest.dylib"
,
"tests/libtestrect.dylib"
,
NULL
};
char
*
testSuites
[]
=
{
"tests/libtest
dummy
.dylib"
,
"tests/libtestrect.dylib"
,
NULL
};
#endif
...
...
@@ -340,7 +340,7 @@ SuiteIsSelected(char *testSuiteName) {
int
retVal
=
1
;
if
(
only_selected_suite
)
{
// extract the suite name. Rips the tests/ and file
suffix
from the suite name
// extract the suite name. Rips the tests/ and file
extension
from the suite name
char
buffer
[
NAME_BUFFER_SIZE
];
int
len
=
strlen
(
testSuiteName
);
...
...
test/test-automation/testdummy/Makefile.am
0 → 100644
View file @
d9ce7a4a
lib_LTLIBRARIES
=
libtestdummy.la
libtestdummy_la_SOURCES
=
testdummy.c ../SDL_test.c
libtestdummy_la_CLAGS
=
-fPIC
-g
libtestdummy_la_LDFLAGS
=
`
sdl-config
--libs
`
distclean-local
:
-
rm
*
.dylib
-
rm
*
.so
test/test-automation/test
s/test
.c
→
test/test-automation/test
dummy/testdummy
.c
View file @
d9ce7a4a
...
...
@@ -18,6 +18,12 @@
3. This notice may not be removed or altered from any source distribution.
*/
/*! \file
* Dummy test suite for test runner. This can be used as a base for
* writing new tests. Dummy suite also works as reference to using
* various asserts and (possible) other utilities.
*/
#ifndef _TEST_C
#define _TEST_C
...
...
@@ -29,13 +35,13 @@
/* Test cases */
static
const
TestCaseReference
test1
=
(
TestCaseReference
){
"
hello
"
,
"description"
,
TEST_ENABLED
,
0
};
(
TestCaseReference
){
"
dummycase1
"
,
"description"
,
TEST_ENABLED
,
0
};
static
const
TestCaseReference
test2
=
(
TestCaseReference
){
"
hello
2"
,
"description"
,
TEST_ENABLED
,
0
};
(
TestCaseReference
){
"
dummycase
2"
,
"description"
,
TEST_ENABLED
,
0
};
static
const
TestCaseReference
test3
=
(
TestCaseReference
){
"
hello
3"
,
"description"
,
TEST_ENABLED
,
0
};
(
TestCaseReference
){
"
dummycase
3"
,
"description"
,
TEST_ENABLED
,
0
};
/* Test suite */
extern
const
TestCaseReference
*
testSuite
[]
=
{
...
...
@@ -48,7 +54,7 @@ TestCaseReference **QueryTestSuite() {
}
/* Test case functions */
void
hello
(
void
*
arg
)
void
dummycase1
(
void
*
arg
)
{
const
char
*
revision
=
SDL_GetRevision
();
...
...
@@ -57,14 +63,14 @@ void hello(void *arg)
AssertEquals
(
3
,
5
,
"fails"
);
}
void
hello
2
(
void
*
arg
)
void
dummycase
2
(
void
*
arg
)
{
char
*
msg
=
"eello"
;
//msg[0] = 'H';
AssertTrue
(
0
,
"fails"
);
}
void
hello
3
(
void
*
arg
)
void
dummycase
3
(
void
*
arg
)
{
AssertTrue
(
1
,
"passes"
);
}
...
...
test/test-automation/testrect/Makefile.in
deleted
100644 → 0
View file @
6346ed9c
This diff is collapsed.
Click to expand it.
test/test-automation/tests/Makefile.am
deleted
100644 → 0
View file @
6346ed9c
lib_LTLIBRARIES
=
libtest.la
libtest_la_SOURCES
=
test.c ../SDL_test.c
libtest_la_CLAGS
=
-fPIC
-g
libtest_la_LDFLAGS
=
`
sdl-config
--libs
`
distclean-local
:
-
rm
*
.dylib
-
rm
*
.so
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment