Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
ndcurves
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
loco-3d
ndcurves
Commits
b7634c93
Commit
b7634c93
authored
5 years ago
by
Pierre Fernbach
Browse files
Options
Downloads
Patches
Plain Diff
[Tests] compareCurve : add more details in the error message
parent
aec381c3
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/Main.cpp
+4
-5
4 additions, 5 deletions
tests/Main.cpp
with
4 additions
and
5 deletions
tests/Main.cpp
+
4
−
5
View file @
b7634c93
...
@@ -83,12 +83,11 @@ void CompareCurves(curve1 c1, curve2 c2, const std::string& errMsg, bool& error
...
@@ -83,12 +83,11 @@ void CompareCurves(curve1 c1, curve2 c2, const std::string& errMsg, bool& error
error
=
true
;
error
=
true
;
}
else
{
}
else
{
// derivative in T_min and T_max
// derivative in T_min and T_max
ComparePoints
(
c1
.
derivate
(
T_min
,
1
),
c2
.
derivate
(
T_min
,
1
),
errMsg
,
error
,
prec
,
false
);
ComparePoints
(
c1
.
derivate
(
T_min
,
1
),
c2
.
derivate
(
T_min
,
1
),
errMsg
+
" Derivates at tMin do not match."
,
error
,
prec
,
false
);
ComparePoints
(
c1
.
derivate
(
T_max
,
1
),
c2
.
derivate
(
T_max
,
1
),
errMsg
,
error
,
prec
,
false
);
ComparePoints
(
c1
.
derivate
(
T_max
,
1
),
c2
.
derivate
(
T_max
,
1
),
errMsg
+
" Derivates at tMax do not match."
,
error
,
prec
,
false
);
// Test values on curves
// Test values on curves
for
(
double
i
=
T_min
;
i
<
T_max
;
i
+=
0.02
)
{
for
(
double
i
=
T_min
;
i
<=
T_max
;
i
+=
0.01
)
{
ComparePoints
(
c1
(
i
),
c2
(
i
),
errMsg
,
error
,
prec
,
false
);
ComparePoints
(
c1
(
i
),
c2
(
i
),
errMsg
+
" Curves evaluation do not match at t = "
+
boost
::
lexical_cast
<
std
::
string
>
(
i
),
error
,
prec
,
false
);
ComparePoints
(
c1
(
i
),
c2
(
i
),
errMsg
,
error
,
prec
,
false
);
}
}
}
}
}
}
...
...
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