tests: Fixed ignored return value

This commit is contained in:
Jonas Kvinge
2025-01-10 00:58:41 +01:00
parent 9095b0d6b2
commit 319558c535
3 changed files with 23 additions and 23 deletions

View File

@@ -65,10 +65,10 @@ void PrintTo(const ::QUrl &url, std::ostream &os) {
TemporaryResource::TemporaryResource(const QString &filename, QObject *parent) : QTemporaryFile(parent) {
setFileTemplate(QDir::tempPath() + u"/strawberry_test-XXXXXX."_s + filename.section(u'.', -1, -1));
open();
Q_ASSERT(open());
QFile resource(filename);
resource.open(QIODevice::ReadOnly);
Q_ASSERT(resource.open(QIODevice::ReadOnly));
write(resource.readAll());
reset();