Fixed the auto tests.

This commit is contained in:
Roberto Raggi
2009-06-19 11:19:41 +02:00
parent aed9367960
commit e6d0f2ca0c
6 changed files with 18 additions and 15 deletions

View File

@@ -28,7 +28,7 @@ public:
TranslationUnit *parse(const QByteArray &source,
TranslationUnit::ParseMode mode)
{
StringLiteral *fileId = control.findOrInsertFileName("<stdin>");
StringLiteral *fileId = control.findOrInsertStringLiteral("<stdin>");
TranslationUnit *unit = new TranslationUnit(&control, fileId);
unit->setSource(source.constData(), source.length());
unit->parse(mode);
@@ -53,8 +53,8 @@ public:
Semantic sem(unit->control());
TranslationUnitAST *ast = unit->ast()->asTranslationUnit();
QVERIFY(ast);
for (DeclarationAST *decl = ast->declarations; decl; decl = decl->next) {
sem.check(decl, globals);
for (DeclarationListAST *decl = ast->declarations; decl; decl = decl->next) {
sem.check(decl->declaration, globals);
}
}