Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
1785ab35
Commit
1785ab35
authored
22 years ago
by
Martin Nilsson
Browse files
Options
Downloads
Patches
Plain Diff
Added more macros
Rev: refdoc/chapters/testsuite.xml:1.12
parent
04cab3b5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
refdoc/chapters/testsuite.xml
+36
-5
36 additions, 5 deletions
refdoc/chapters/testsuite.xml
with
36 additions
and
5 deletions
refdoc/chapters/testsuite.xml
+
36
−
5
View file @
1785ab35
...
@@ -236,7 +236,7 @@ Total tests: 1 (0 tests skipped)
...
@@ -236,7 +236,7 @@ Total tests: 1 (0 tests skipped)
tests cases. A good test suite for a function includes both some
tests cases. A good test suite for a function includes both some
trivial tests to ensure that the basic functionality works and some
trivial tests to ensure that the basic functionality works and some
nasty tests to test the borderlands of what the function is capable
nasty tests to test the borderlands of what the function is capable
of.
</p>
of
, e.g. empty in parameters
.
</p>
<p>
Also, when a bug in Pike has been found, a minimized test case
<p>
Also, when a bug in Pike has been found, a minimized test case
the triggers the bug should also be added to the test suite. After
the triggers the bug should also be added to the test suite. After
...
@@ -259,8 +259,8 @@ test_any([[
...
@@ -259,8 +259,8 @@ test_any([[
<subsection
title=
"test_any_equal"
>
<subsection
title=
"test_any_equal"
>
<p>
The test_any_equal macro tests if the result of two pike
<p>
The test_any_equal macro tests if the result of two pike
expressions are identical, e.g. if equal(a,b). The first
expressions are identical, e.g. if equal(a,b). The first
expression should be a complete block,
while the other expression
expression should be a complete block,
that returns a value, while
should be a simple pike statement.
</p>
the other expression
should be a simple pike statement.
</p>
<example>
<example>
test_any_equal([[
test_any_equal([[
mixed a=({1,2,3});
mixed a=({1,2,3});
...
@@ -327,10 +327,41 @@ test_compile([[Stdio.File foo=Stdio.File();]])
...
@@ -327,10 +327,41 @@ test_compile([[Stdio.File foo=Stdio.File();]])
</subsection>
</subsection>
<subsection
title=
"test_compile_any"
>
<subsection
title=
"test_compile_any"
>
<p>
Tests if the code compiles, just as
<tt>
test_compile
</tt>
, but
is a complete block of code and not just an expression.
</p>
<example>
test_compile_any([[
void foo()
{
Stdio.File bar(int x, int y)
{
return 0;
};
}
]])
</example>
</subsection>
<subsection
title=
"test_compile_error"
>
<p>
Does the inverse of
<tt>
test_compile
</tt>
; verifies that the
code does not compile.
</p>
<example>
test_compile_error([[ int a="a"; ]])
</example>
</subsection>
<subsection
title=
"test_compile_error_any"
>
<p>
Does the inverse of
<tt>
test_compile_any
</tt>
; verifies that
the code does not compile.
</p>
<example>
test_compile_error_any([[
int a=5;
string b="a";
a=b;
]])
</example>
</subsection>
</subsection>
<subsection
title=
"test_compile_error"
/>
<subsection
title=
"test_compile_error_any"
/>
<subsection
title=
"test_compile_warning"
/>
<subsection
title=
"test_compile_warning"
/>
<subsection
title=
"test_compile_warning_any"
/>
<subsection
title=
"test_compile_warning_any"
/>
<subsection
title=
"test_eval_error"
/>
<subsection
title=
"test_eval_error"
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment