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
6a2c27c6
Commit
6a2c27c6
authored
May 24, 2011
by
Markus Kauppila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplifying
parent
58ff8223
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
59 deletions
+8
-59
.hgignore
test/test-automation/.hgignore
+0
-24
asserts.c
test/test-automation/asserts.c
+5
-2
asserts.h
test/test-automation/asserts.h
+1
-1
test.c
test/test-automation/test.c
+2
-2
test.h
test/test-automation/test.h
+0
-30
No files found.
test/test-automation/.hgignore
deleted
100644 → 0
View file @
58ff8223
syntax: glob
.DS_Store
autom4te*
configure
config.h
config.cache
config.log
config.status
Makefile
runner
*.o
*.so
*.dSYM
# for vim
*.swp
# for Eclipse
.project
.cproject
.settings
test/test-automation/asserts.c
View file @
6a2c27c6
...
...
@@ -26,10 +26,13 @@
#include <stdlib.h>
void
assertEquals
(
Uint32
expected
,
Uint32
actual
)
assertEquals
(
char
*
message
,
Uint32
expected
,
Uint32
actual
)
{
if
(
expected
!=
actual
)
{
exit
(
1
);
printf
(
"===============================
\n
"
);
printf
(
"Assert failed: %s
\n
"
,
message
);
printf
(
"Expected %d, got %d
\n
"
,
expected
,
actual
);
printf
(
"===============================
\n
"
);
}
}
...
...
test/test-automation/asserts.h
View file @
6a2c27c6
...
...
@@ -23,6 +23,6 @@
#include <SDL/SDL.h>
void
assertEquals
(
Uint32
expected
,
Uint32
actual
);
void
assertEquals
(
char
*
message
,
Uint32
expected
,
Uint32
actual
);
#endif
test/test-automation/test.c
View file @
6a2c27c6
...
...
@@ -37,7 +37,7 @@ void hello(void *arg){
const
char
*
revision
=
SDL_GetRevision
();
printf
(
"Revision is %s
\n
"
,
revision
);
assertEquals
(
3
,
5
);
assertEquals
(
"will fail"
,
3
,
5
);
}
void
hello2
(
void
*
arg
)
{
...
...
@@ -48,7 +48,7 @@ void hello2(void *arg) {
void
hello3
(
void
*
arg
)
{
printf
(
"hello
\n
"
);
assertEquals
(
3
,
3
);
assertEquals
(
"passes"
,
3
,
3
);
}
#endif
test/test-automation/test.h
deleted
100644 → 0
View file @
58ff8223
/*
Copyright (C) 2011 Markus Kauppila <markus.kauppila@gmail.com>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#ifndef _TEST_H
#define _TEST_H
char
**
suite
();
void
hello
(
void
*
arg
);
void
hello2
(
void
*
arg
);
void
hello3
(
void
*
arg
);
#endif
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