Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
b939beb1
Commit
b939beb1
authored
Mar 03, 2013
by
Davis King
Browse files
made test more robust
parent
c82e003e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
dlib/test/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.
// 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