Displaying 1 result from an estimated 1 matches for "loop_condition".
2008 May 29
7
how to write spec for infinite loop?
Hi,
I''ve got trouble when describe infinite loop.
code snippet:
def start_loop
while true
data = self.server.handle_client
if data
self.manager.dispatch(data)
end
end
end
without the loop, it is easy to test the logic.
but how can I describe it to tell the developer ( me :-) ) that there
should be an infinite loop inside.
thanks.
Regards,
Peng