StarlingGraphics / Starling-Extension-Graphics

flash.display.Graphics style extension for the Starling Flash GPU rendering framework
https://github.com/StarlingGraphics/Starling-Extension-Graphics/wiki
MIT License
285 stars 88 forks source link

Objects using Graphics are testable #85

Closed islamaliev closed 10 years ago

islamaliev commented 10 years ago

added a check if Starling.current is not null before accessing it in Graphics constructor. It's needed only for testing purposes. When writing integration tests for some objects that use Graphic object it always throws an exception because Staring instance is not defined due to the fact that it's mocked. So this check allows to prevent that exception and write tests.