From 6c3523fbed164732654edfc6891a2a901e867e37 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 29 Mar 2013 11:01:11 -0300 Subject: [PATCH] Fix file_unittest.cpp --- src/file/file_unittest.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/file/file_unittest.cpp b/src/file/file_unittest.cpp index 8ddd949e2..aeadaca0a 100644 --- a/src/file/file_unittest.cpp +++ b/src/file/file_unittest.cpp @@ -46,7 +46,9 @@ TEST(File, SeveralSizes) doc->setFilename(&fn[0]); // Random pixels - Image* image = doc->getSprite()->getCurrentImage(); + LayerImage* layer = dynamic_cast(doc->getSprite()->getFolder()->getFirstLayer()); + ASSERT_TRUE(layer != NULL); + Image* image = doc->getSprite()->getStock()->getImage(layer->getCel(FrameNumber(0))->getImage()); std::srand(w*h); int c = std::rand()%256; for (int y=0; ygetSprite()->getHeight()); // Same random pixels (see the seed) - Image* image = doc->getSprite()->getCurrentImage(); + LayerImage* layer = dynamic_cast(doc->getSprite()->getFolder()->getFirstLayer()); + ASSERT_TRUE(layer != NULL); + Image* image = doc->getSprite()->getStock()->getImage(layer->getCel(FrameNumber(0))->getImage()); std::srand(w*h); int c = std::rand()%256; for (int y=0; y