Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
1e997e24
Commit
1e997e24
authored
Sep 22, 2021
by
Guillaume Quintard
Committed by
Dridi Boukelmoune
Sep 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[vnum] more lenient test
fixes #3697
parent
50dbec19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
vnum.h
include/vnum.h
+1
-0
vnum.c
lib/libvarnish/vnum.c
+3
-2
No files found.
include/vnum.h
View file @
1e997e24
...
...
@@ -31,6 +31,7 @@
*/
/* from libvarnish/vnum.c */
#define VNUM_EPSILON (1e-9d)
double
VNUM
(
const
char
*
p
);
vtim_dur
VNUM_duration_unit
(
vtim_dur
r
,
const
char
*
b
,
const
char
*
e
);
vtim_dur
VNUM_duration
(
const
char
*
p
);
...
...
lib/libvarnish/vnum.c
View file @
1e997e24
...
...
@@ -693,9 +693,10 @@ main(int argc, char *argv[])
++
ec
;
}
d1
=
VNUM_duration
(
" 365.24219d "
);
if
(
d1
!=
31556908
.
8
)
{
d2
=
31556908
.
8
;
if
(
fabs
(
d1
-
d2
)
>
VNUM_EPSILON
)
{
printf
(
"%s: VNUM_Duration() wrong, %.3f delta = %e
\n
"
,
*
argv
,
d1
,
d1
-
31556908
.
8
);
*
argv
,
d1
,
d1
-
d2
);
++
ec
;
}
/* TODO: test invalid strings */
...
...
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