closed #3684, Optimize the code of TextureAtlas test case.