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
6c319b5d
Commit
6c319b5d
authored
Aug 14, 2011
by
Markus Kauppila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating dummy test suite.
parent
04b2c7e3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
runner.c
test/test-automation/src/runner/runner.c
+1
-1
testdummy.c
test/test-automation/tests/testdummy/testdummy.c
+23
-3
No files found.
test/test-automation/src/runner/runner.c
View file @
6c319b5d
...
...
@@ -1066,7 +1066,7 @@ PrintUsage() {
printf
(
" [--logfile BASENAME] [--logdir DIR] [--log-stdout] [--xml]
\n
"
);
printf
(
" [--xsl [STYLESHEET]] [--seed VALUE] [--iterations VALUE]
\n
"
);
printf
(
" [--exec-key KEY] [--timeout VALUE] [--test TEST]
\n
"
);
printf
(
" [--name-contains SUBSTR] [--suite SUITE]
\n
"
);
printf
(
" [--name-contains SUBSTR] [--suite SUITE]
[--include-dummy]
\n
"
);
printf
(
" [--version] [--help]
\n
"
);
printf
(
"Options:
\n
"
);
printf
(
" --in-proc Executes tests in-process
\n
"
);
...
...
test/test-automation/tests/testdummy/testdummy.c
View file @
6c319b5d
...
...
@@ -41,11 +41,14 @@ static const TestCaseReference test2 =
(
TestCaseReference
){
"dummycase2"
,
"description"
,
TEST_ENABLED
,
0
,
0
};
static
const
TestCaseReference
test3
=
(
TestCaseReference
){
"dummycase3"
,
"description"
,
TEST_ENABLED
,
0
,
2
};
(
TestCaseReference
){
"testfuzzy_case3"
,
"description"
,
TEST_ENABLED
,
0
,
2
};
static
const
TestCaseReference
test4
=
(
TestCaseReference
){
"testfuzzy_case4"
,
"description"
,
TEST_ENABLED
,
0
,
2
};
/* Test suite */
extern
const
TestCaseReference
*
testSuite
[]
=
{
&
test1
,
&
test2
,
&
test3
,
NULL
&
test1
,
&
test2
,
&
test3
,
&
test4
,
NULL
};
...
...
@@ -139,8 +142,25 @@ dummycase2(void *arg)
}
void
dummy
case3
(
void
*
arg
)
testfuzzy_
case3
(
void
*
arg
)
{
// Simulates a fuzzing failure
AssertTrue
(
RandomUint8
()
!=
100
,
"Value is 100"
);
}
static
void
f
(
void
)
{
int
*
x
=
malloc
(
10
*
sizeof
(
int
));
x
[
10
]
=
0
;
// problem 1: heap block overrun
}
// problem 2: memory leak -- x not freed
void
testfuzzy_case4
(
void
*
arg
)
{
// Creates a memory leak
f
();
AssertPass
(
""
);
}
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