Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spacecreator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TASTE
spacecreator
Merge requests
!1201
PL1
Unit test for topohelp::geom::pos
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Imported
Unit test for topohelp::geom::pos
dengof_1072_ut_26
into
master
Overview
1
Commits
1
Pipelines
1
Changes
1
Closed
Imported
Juan Font Alonso
requested to merge
dengof_1072_ut_26
into
master
1 year ago
Overview
1
Commits
1
Pipelines
1
Changes
1
Expand
@gschwann
, @hugo_vs please review when have the time
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
4c35808d
1 commit,
1 year ago
1 file
+
18
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
tests/unittests/topohelper/geometry/tst_pos.cpp
+
18
−
4
Options
@@ -17,7 +17,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/lgpl-2.1.html
#include
"topohelper/geometry.h"
#include
<QPointF>
#include
<QtTest>
using
namespace
topohelp
;
@@ -30,13 +29,28 @@ class TestPos : public QObject
private
slots
:
void
testPos_data
()
{
QSKIP
(
"Not implemented yet"
);
QTest
::
addColumn
<
QVector
<
qint32
>>
(
"coordinates"
);
QTest
::
addColumn
<
QPointF
>
(
"expectedResult"
);
constexpr
QPointF
testPointF
(
10
,
20
);
const
QPoint
&
testPoint
=
testPointF
.
toPoint
();
constexpr
QPointF
noPoint
;
QTest
::
newRow
(
"Empty"
)
<<
QVector
<
qint32
>
{}
<<
noPoint
;
#ifdef QT_NO_DEBUG // avoid the assertion
QTest
::
newRow
(
"Invalid"
)
<<
QVector
<
qint32
>
{
testPoint
.
x
()
}
<<
noPoint
;
#endif
QTest
::
newRow
(
"Valid"
)
<<
QVector
<
qint32
>
{
testPoint
.
x
(),
testPoint
.
y
()
}
<<
testPointF
;
}
void
testPos
()
{
QSKIP
(
"Not implemented yet"
);
// const auto &actualResult = pos(replaceMe);
QFETCH
(
QVector
<
qint32
>
,
coordinates
);
QFETCH
(
QPointF
,
expectedResult
);
const
auto
&
actualResult
=
pos
(
coordinates
);
QCOMPARE
(
actualResult
,
expectedResult
);
}
};
Loading