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