Revert and refine tests for uninitialized queue
`Queue` and `SizedQueue` still check array members. Only the test of `ConditionVariable` is useless.
This commit is contained in:
parent
0a466e3072
commit
a7bc000eaa
@ -7,6 +7,18 @@ class TestThreadQueue < Test::Unit::TestCase
|
||||
Queue = Thread::Queue
|
||||
SizedQueue = Thread::SizedQueue
|
||||
|
||||
def test_queue_initialized
|
||||
assert_raise_with_message(TypeError, /\bQueue.* not initialized/) {
|
||||
Queue.allocate.push(nil)
|
||||
}
|
||||
end
|
||||
|
||||
def test_sized_queue_initialized
|
||||
assert_raise_with_message(TypeError, /\bSizedQueue.* not initialized/) {
|
||||
SizedQueue.allocate.push(nil)
|
||||
}
|
||||
end
|
||||
|
||||
def test_queue
|
||||
grind(5, 1000, 15, Queue)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user