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
88d6f702
Commit
88d6f702
authored
Jun 04, 2011
by
Markus Kauppila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed old comments and added new ones.
parent
1819321f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
SDL_test.c
test/test-automation/SDL_test.c
+18
-0
runner.c
test/test-automation/runner.c
+1
-1
No files found.
test/test-automation/SDL_test.c
View file @
88d6f702
...
...
@@ -48,6 +48,7 @@ _TestCaseQuit()
{
//! \todo make the test fail, if it does not contain any asserts
printf
(
"Asserts: passed %d, failed %d
\n
"
,
_testAssertsPassed
,
_testAssertsFailed
);
if
(
_testAssertsFailed
==
0
&&
_testAssertsPassed
==
0
)
{
_testReturnValue
=
2
;
}
...
...
@@ -55,6 +56,15 @@ _TestCaseQuit()
return
_testReturnValue
;
}
/*!
* Assert function. Tests if the expected value equals the actual value, then
* the test assert succeeds, otherwise it fails and warns about it.
*
* \param expected Value user expects to have
* \param actual The actual value of tested variable
* \param message Message that will be printed if assert fails
*/
void
AssertEquals
(
Uint32
expected
,
Uint32
actual
,
char
*
message
,
...)
{
...
...
@@ -73,6 +83,14 @@ AssertEquals(Uint32 expected, Uint32 actual, char* message, ...)
}
}
/*!
* Assert function. Tests if the given condition is true. True in
* this case means non-zero value. If the condition is true, the
* assert passes, otherwise it fails.
*
* \param condition Condition which will be evaluated
* \param message Message that will be printed if assert fails
*/
void
AssertTrue
(
int
condition
,
char
*
message
,
...)
{
...
...
test/test-automation/runner.c
View file @
88d6f702
...
...
@@ -61,7 +61,7 @@ ScanForTestSuites() {
/*!
* Loads test suite which is implemented as dynamic library.
*
* \param test
0,330
* \param test
SuiteName Name of the test suite which will be loaded
*
* \return Pointer to loaded test suite, or NULL if library could not be loaded
*/
...
...
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