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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
image.cpp
dlib/test/image.cpp
+9
-1
No files found.
dlib/test/image.cpp
View file @
b939beb1
...
@@ -1352,8 +1352,16 @@ namespace
...
@@ -1352,8 +1352,16 @@ namespace
// Lets the float_details object while we are here doing this stuff.
// Lets the float_details object while we are here doing this stuff.
float_details
temp
=
val
;
float_details
temp
=
val
;
T
val2
=
temp
;
T
val2
=
temp
;
// for the same type we should exactly reproduce the value.
// 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
);
DLIB_TEST
(
val2
==
val
);
}
float
valf
=
temp
;
float
valf
=
temp
;
double
vald
=
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