ippa / jaws

Jaws - HTML5 canvas javascript 2D Game Framework
https://jawsjs.ippa.se
GNU Lesser General Public License v3.0
363 stars 75 forks source link

Added more test coverage to the Sprite List object #27

Closed dmitrizagidulin closed 12 years ago

dmitrizagidulin commented 12 years ago

Hi ippa, Before rewriting the Sprite List object, here are some more unit tests that should cover the current API (at least the function defined in sprite_list.js -- this doesn't count array-specific functions like map() or filter() that are maybe being used on sprite list objects, those are coming in the next commit).

Anyways, like you said, the remove/draw test is passing in IE and Chrome but failing in Firefox.

Check out the failing test SpriteList:removeIf() (and deleteIf()) -- this fails on all 3 browsers. I have the logic correct, yes? removeIf() should remove /every/ element that passes the condition test?

Hope this helps. More tests, and patch, forthcoming.

ippa commented 12 years ago

looks good!