| 300 | } |
| 301 | |
| 302 | void StressTest1::shouldNotCrash(float dt) |
| 303 | { |
| 304 | unschedule("should_not_crash_key"); |
| 305 | |
| 306 | auto s = Director::getInstance()->getWinSize(); |
| 307 | |
| 308 | // if the node has timers, it crashes |
| 309 | auto explosion = ParticleSun::create(); |
| 310 | explosion->setTexture(Director::getInstance()->getTextureCache()->addImage("Images/fire.png")); |
| 311 | |
| 312 | // if it doesn't, it works Ok. |
| 313 | // auto explosion = [Sprite create:@"grossinis_sister2.png"); |
| 314 | |
| 315 | explosion->setPosition(Vec2(s.width / 2, s.height / 2)); |
| 316 | |
| 317 | runAction(Sequence::create(RotateBy::create(2, 360), CallFuncN::create(AX_CALLBACK_1(StressTest1::removeMe, this)), |
| 318 | nullptr)); |
| 319 | |
| 320 | addChild(explosion); |
| 321 | } |
| 322 | |
| 323 | // remove |
| 324 | void StressTest1::removeMe(Node* node) |
nothing calls this directly
no test coverage detected