Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flatpak-qt-creator
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
Marco Bubke
flatpak-qt-creator
Commits
c876ad1c
Commit
c876ad1c
authored
14 years ago
by
Christian Kamm
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for type pretty printer.
Mainly to not have unused functions inside the autotest. Reviewed-by: Bill King
parent
2f30137b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/auto/cplusplus/typeprettyprinter/tst_typeprettyprinter.cpp
+14
-0
14 additions, 0 deletions
...uto/cplusplus/typeprettyprinter/tst_typeprettyprinter.cpp
with
14 additions
and
0 deletions
tests/auto/cplusplus/typeprettyprinter/tst_typeprettyprinter.cpp
+
14
−
0
View file @
c876ad1c
...
@@ -76,6 +76,9 @@ Argument *arg(const QString &name, const FullySpecifiedType &ty)
...
@@ -76,6 +76,9 @@ Argument *arg(const QString &name, const FullySpecifiedType &ty)
FullySpecifiedType
voidTy
()
FullySpecifiedType
voidTy
()
{
return
FullySpecifiedType
(
new
VoidType
);
}
{
return
FullySpecifiedType
(
new
VoidType
);
}
FullySpecifiedType
intTy
()
{
return
FullySpecifiedType
(
new
IntegerType
(
IntegerType
::
Int
));
}
FullySpecifiedType
fnTy
(
const
QString
&
name
,
const
FullySpecifiedType
&
ret
)
FullySpecifiedType
fnTy
(
const
QString
&
name
,
const
FullySpecifiedType
&
ret
)
{
{
Function
*
fn
=
new
Function
(
unit
,
0
,
nameId
(
name
));
Function
*
fn
=
new
Function
(
unit
,
0
,
nameId
(
name
));
...
@@ -181,6 +184,17 @@ void tst_TypePrettyPrinter::basic_data()
...
@@ -181,6 +184,17 @@ void tst_TypePrettyPrinter::basic_data()
addRow
(
ref
(
arr
(
arr
(
voidTy
()))),
"void (&)[][]"
);
addRow
(
ref
(
arr
(
arr
(
voidTy
()))),
"void (&)[][]"
);
addRow
(
ref
(
arr
(
ref
(
voidTy
()))),
"void &(&)[]"
);
addRow
(
ref
(
arr
(
ref
(
voidTy
()))),
"void &(&)[]"
);
addRow
(
arr
(
ref
(
arr
(
voidTy
()))),
"void (&[])[]"
);
addRow
(
arr
(
ref
(
arr
(
voidTy
()))),
"void (&[])[]"
);
// rvalue references
addRow
(
rref
(
voidTy
()),
"void &&"
);
addRow
(
rref
(
cnst
(
voidTy
())),
"const void &&"
);
addRow
(
rref
(
arr
(
voidTy
())),
"void (&&)[]"
);
addRow
(
rref
(
arr
(
arr
(
voidTy
()))),
"void (&&)[][]"
);
// simple functions
addRow
(
ptr
(
fnTy
(
"foo"
,
voidTy
(),
intTy
())),
"void (*foo)(int)"
,
"foo"
);
addRow
(
ptr
(
fnTy
(
"foo"
,
voidTy
(),
ptr
(
voidTy
()))),
"void (*foo)(void *)"
,
"foo"
);
}
}
void
tst_TypePrettyPrinter
::
basic
()
void
tst_TypePrettyPrinter
::
basic
()
...
...
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