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
ff535979
Commit
ff535979
authored
Jan 18, 2018
by
Davis King
Browse files
Changed test a little so that it hopefully doesn't fail on travis-ci's
overloaded OS X test servers.
parent
07d7904b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
dlib/test/timer.cpp
dlib/test/timer.cpp
+10
-10
No files found.
dlib/test/timer.cpp
View file @
ff535979
...
@@ -128,11 +128,11 @@ namespace
...
@@ -128,11 +128,11 @@ namespace
t1
.
set_delay_time
(
1000
);
t1
.
set_delay_time
(
1000
);
t2
.
set_delay_time
(
500
);
t2
.
set_delay_time
(
500
);
t3
.
set_delay_time
(
2
00
);
t3
.
set_delay_time
(
15
00
);
DLIB_TEST
(
t1
.
delay_time
()
==
1000
);
DLIB_TEST
(
t1
.
delay_time
()
==
1000
);
DLIB_TEST
(
t2
.
delay_time
()
==
500
);
DLIB_TEST
(
t2
.
delay_time
()
==
500
);
DLIB_TEST
(
t3
.
delay_time
()
==
2
00
);
DLIB_TEST
(
t3
.
delay_time
()
==
15
00
);
DLIB_TEST
(
t1
.
is_running
()
==
false
);
DLIB_TEST
(
t1
.
is_running
()
==
false
);
DLIB_TEST
(
t2
.
is_running
()
==
false
);
DLIB_TEST
(
t2
.
is_running
()
==
false
);
DLIB_TEST
(
t3
.
is_running
()
==
false
);
DLIB_TEST
(
t3
.
is_running
()
==
false
);
...
@@ -155,7 +155,7 @@ namespace
...
@@ -155,7 +155,7 @@ namespace
DLIB_TEST
(
h
.
count
==
0
);
DLIB_TEST
(
h
.
count
==
0
);
DLIB_TEST
(
t1
.
delay_time
()
==
1000
);
DLIB_TEST
(
t1
.
delay_time
()
==
1000
);
DLIB_TEST
(
t2
.
delay_time
()
==
500
);
DLIB_TEST
(
t2
.
delay_time
()
==
500
);
DLIB_TEST
(
t3
.
delay_time
()
==
2
00
);
DLIB_TEST
(
t3
.
delay_time
()
==
15
00
);
DLIB_TEST
(
t1
.
is_running
()
==
false
);
DLIB_TEST
(
t1
.
is_running
()
==
false
);
DLIB_TEST
(
t2
.
is_running
()
==
false
);
DLIB_TEST
(
t2
.
is_running
()
==
false
);
DLIB_TEST
(
t3
.
is_running
()
==
false
);
DLIB_TEST
(
t3
.
is_running
()
==
false
);
...
@@ -172,7 +172,7 @@ namespace
...
@@ -172,7 +172,7 @@ namespace
DLIB_TEST
(
t1
.
delay_time
()
==
1000
);
DLIB_TEST
(
t1
.
delay_time
()
==
1000
);
DLIB_TEST
(
t2
.
delay_time
()
==
500
);
DLIB_TEST
(
t2
.
delay_time
()
==
500
);
DLIB_TEST
(
t3
.
delay_time
()
==
2
00
);
DLIB_TEST
(
t3
.
delay_time
()
==
15
00
);
DLIB_TEST
(
t1
.
is_running
()
==
true
);
DLIB_TEST
(
t1
.
is_running
()
==
true
);
DLIB_TEST
(
t2
.
is_running
()
==
true
);
DLIB_TEST
(
t2
.
is_running
()
==
true
);
DLIB_TEST
(
t3
.
is_running
()
==
true
);
DLIB_TEST
(
t3
.
is_running
()
==
true
);
...
@@ -189,7 +189,7 @@ namespace
...
@@ -189,7 +189,7 @@ namespace
DLIB_TEST
(
t1
.
delay_time
()
==
1000
);
DLIB_TEST
(
t1
.
delay_time
()
==
1000
);
DLIB_TEST
(
t2
.
delay_time
()
==
500
);
DLIB_TEST
(
t2
.
delay_time
()
==
500
);
DLIB_TEST
(
t3
.
delay_time
()
==
2
00
);
DLIB_TEST
(
t3
.
delay_time
()
==
15
00
);
DLIB_TEST
(
t1
.
is_running
()
==
false
);
DLIB_TEST
(
t1
.
is_running
()
==
false
);
DLIB_TEST
(
t2
.
is_running
()
==
false
);
DLIB_TEST
(
t2
.
is_running
()
==
false
);
DLIB_TEST
(
t3
.
is_running
()
==
false
);
DLIB_TEST
(
t3
.
is_running
()
==
false
);
...
@@ -215,16 +215,16 @@ namespace
...
@@ -215,16 +215,16 @@ namespace
DLIB_TEST
(
t2
.
is_running
()
==
true
);
DLIB_TEST
(
t2
.
is_running
()
==
true
);
DLIB_TEST
(
t3
.
is_running
()
==
true
);
DLIB_TEST
(
t3
.
is_running
()
==
true
);
dlib
::
sleep
(
1
1
00
);
dlib
::
sleep
(
1
8
00
);
print_spinner
();
print_spinner
();
// this should allow the timers to trigger
8
times
// this should allow the timers to trigger
5
times
t1
.
stop
();
t1
.
stop
();
t2
.
stop
();
t2
.
stop
();
t3
.
stop
();
t3
.
stop
();
DLIB_TEST_MSG
(
h
.
count
==
8
*
i
,
"h.count: "
<<
h
.
count
<<
" i: "
<<
i
);
DLIB_TEST_MSG
(
h
.
count
==
5
*
i
,
"h.count: "
<<
h
.
count
<<
" i: "
<<
i
);
dlib
::
sleep
(
1100
);
dlib
::
sleep
(
1100
);
DLIB_TEST_MSG
(
h
.
count
==
8
*
i
,
"h.count: "
<<
h
.
count
<<
" i: "
<<
i
);
DLIB_TEST_MSG
(
h
.
count
==
5
*
i
,
"h.count: "
<<
h
.
count
<<
" i: "
<<
i
);
}
}
...
@@ -255,7 +255,7 @@ namespace
...
@@ -255,7 +255,7 @@ namespace
h
.
count
=
0
;
h
.
count
=
0
;
t3
.
start
();
t3
.
start
();
DLIB_TEST
(
t3
.
is_running
()
==
true
);
DLIB_TEST
(
t3
.
is_running
()
==
true
);
DLIB_TEST
(
t3
.
delay_time
()
==
2
00
);
DLIB_TEST
(
t3
.
delay_time
()
==
15
00
);
DLIB_TEST_MSG
(
h
.
count
==
0
,
h
.
count
);
DLIB_TEST_MSG
(
h
.
count
==
0
,
h
.
count
);
t3
.
clear
();
t3
.
clear
();
DLIB_TEST
(
t3
.
is_running
()
==
false
);
DLIB_TEST
(
t3
.
is_running
()
==
false
);
...
...
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