summaryrefslogtreecommitdiffstats
path: root/tests/auto/repparser/tst_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/repparser/tst_parser.cpp')
-rw-r--r--tests/auto/repparser/tst_parser.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/repparser/tst_parser.cpp b/tests/auto/repparser/tst_parser.cpp
index 58162ce..46211a2 100644
--- a/tests/auto/repparser/tst_parser.cpp
+++ b/tests/auto/repparser/tst_parser.cpp
@@ -386,8 +386,9 @@ void tst_Parser::testModels()
QCOMPARE(ast.classes.count(), 1);
const ASTClass astClass = ast.classes.first();
- ASTModel model = astClass.models.first();
- QCOMPARE(model.name, expectedModel);
+ ASTModel model = astClass.modelMetadata.first();
+ ASTProperty property = astClass.properties.at(model.propertyIndex);
+ QCOMPARE(property.name, expectedModel);
int i = 0;
for (auto role : model.roles) {
QCOMPARE(role.name, expectedRoles.at(i).name);
@@ -430,9 +431,9 @@ void tst_Parser::testClasses()
const ASTClass astSub = ast.classes.value(0);
const ASTClass astObj = ast.classes.value(1);
- const ASTChildRep child = astObj.children.first();
- QCOMPARE(child.name, expectedName);
- QCOMPARE(child.type, expectedType);
+ const ASTProperty property = astObj.properties.at(astObj.subClassPropertyIndices.at(0));
+ QCOMPARE(property.name, expectedName);
+ QCOMPARE(property.type, expectedType);
}
void tst_Parser::testInvalid_data()