Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
b939beb1
Commit
b939beb1
authored
Mar 03, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made test more robust
parent
c82e003e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
image.cpp
dlib/test/image.cpp
+10
-2
No files found.
dlib/test/image.cpp
View file @
b939beb1
...
...
@@ -1352,8 +1352,16 @@ namespace
// Lets the float_details object while we are here doing this stuff.
float_details
temp
=
val
;
T
val2
=
temp
;
// for the same type we should exactly reproduce the value.
DLIB_TEST
(
val2
==
val
);
// for the same type we should exactly reproduce the value (unless
// it's long double and then maybe it's slightly different).
if
(
is_same_type
<
T
,
long
double
>::
value
)
{
DLIB_TEST
(
std
::
abs
(
val2
-
val
)
<
scale
*
std
::
numeric_limits
<
T
>::
epsilon
());
}
else
{
DLIB_TEST
(
val2
==
val
);
}
float
valf
=
temp
;
double
vald
=
temp
;
...
...
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