|
From: erixtekila <eri...@if...> - 2005-01-11 14:57:10
|
Luke tried to give an answer to this question before. If you read French, you could see : http://www.v-i-a.net/blog/archives/000014.html There is a snippet (english) which try to solve this issue. hth Le 11 janv. 05, =E0 14:44, beRt bRuynooghe a =E9crit : > Anybody an idea how we can do unittesting of asynchronous code? > E.g.: when an image is loaded, I want to check if the right image is=20= > loaded. > > I tried to use setInterval to call a function that fails the test, and=20= > have the eventHandler clear the interval. Two problems arose: > 1. tearDown doesn't wait for the eventhandler > 2. sometimes, testcase seems to be freed before the eventHandler was=20= > called. > > Kind regards, > Bert Bruynooghe. > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users > _____________________________________________________________________ > > Envie de discuter gratuitement avec vos amis ? > T=E9l=E9chargez Yahoo! Messenger http://yahoo.ifrance.com > |