summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Burrows <Daniel_Burrows@alumni.brown.edu>2006-08-06 20:13:26 +0000
committerDaniel Burrows <Daniel_Burrows@alumni.brown.edu>2006-08-06 20:13:26 +0000
commit4bdb4a4959936613b163b826b19786a2134294bc (patch)
treefd9c91be7a540eb9efb0d155841f5ce715fa6c8e /tests
parentc8d9872887e4120542a4b78c7778feb6d67b7604 (diff)
downloadaptitude-4bdb4a4959936613b163b826b19786a2134294bc.tar.gz
[aptitude @ Document the timed-take-timeout test case.]
Diffstat (limited to 'tests')
-rw-r--r--tests/test_threads.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_threads.cc b/tests/test_threads.cc
index 7e98d9aa..14010b10 100644
--- a/tests/test_threads.cc
+++ b/tests/test_threads.cc
@@ -108,6 +108,8 @@ public:
int dummy;
+ // Test that timing out trying to take values from an empty box works:
+
CPPUNIT_ASSERT(!b.timed_take(dummy, timeout));
timeval now2;
@@ -116,6 +118,7 @@ public:
CPPUNIT_ASSERT(now2.tv_sec >= now.tv_sec + 2);
CPPUNIT_ASSERT(now2.tv_sec > now.tv_sec + 2 || now2.tv_usec >= now.tv_usec);
+ // Test that we can retrieve a value from a full box:
timeout.tv_sec = now2.tv_sec + 2;
timeout.tv_nsec = now2.tv_usec * 1000;