Skip to content

Commit d0daf6f

Browse files
committed
Try to fix SvgSkin test
1 parent bcbda78 commit d0daf6f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/skins/svgskin_test.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,9 @@ TEST_F(SVGSkinTest, Textures)
6464
}
6565

6666
QBuffer buffer;
67-
texture.toImage().save(&buffer, "png");
68-
QFile ref("svg_texture_results/" + QString::number(std::min(i, 15)) + ".png");
69-
ref.open(QFile::ReadOnly);
70-
buffer.open(QBuffer::ReadOnly);
71-
ASSERT_EQ(buffer.readAll(), ref.readAll());
67+
QImage image = texture.toImage();
68+
QImage ref("svg_texture_results/" + QString::number(std::min(i, 15)) + ".png");
69+
70+
ASSERT_LE(fuzzyCompareImages(image, ref), 0.1);
7271
}
7372
}

0 commit comments

Comments
 (0)