simplify the raw json parsing

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>

Fixed Tests

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-09-16 10:20:24 +03:00
parent 4053229544
commit 01e98a6ce8
8 changed files with 104 additions and 164 deletions

View File

@ -64,16 +64,14 @@ class MetaComponentParseTest : public QObject {
QJsonValue description_json = obj.value("description");
QJsonValue expected_json = obj.value("expected_output");
QVERIFY(description_json.isUndefined() == false);
QVERIFY(expected_json.isString() == true);
QVERIFY(!description_json.isUndefined());
QVERIFY(expected_json.isString());
QString expected = expected_json.toString();
QString processed;
bool valid = ResourcePackUtils::processComponent(description_json, processed);
QString processed = ResourcePackUtils::processComponent(description_json);
QVERIFY(processed == expected);
QVERIFY(valid == true);
QCOMPARE(processed, expected);
}
private slots: