| 70 | } |
| 71 | |
| 72 | void CMakeParserTest::testParserWithBadData() |
| 73 | { |
| 74 | QFETCH( QString, text ); |
| 75 | QTemporaryFile tempFile; |
| 76 | tempFile.setAutoRemove( false ); |
| 77 | tempFile.open(); |
| 78 | if ( !QFile::exists( tempFile.fileName() ) ) |
| 79 | QFAIL( "Unable to open temporary file" ); |
| 80 | |
| 81 | tempFile.write( text.toUtf8() ); |
| 82 | tempFile.close(); //hacks to the get name of the file |
| 83 | // CMakeAst* ast = new CMakeAst; |
| 84 | // QString tempName = tempFile.fileName(); |
| 85 | // bool parseError = CMakeListsParser::parseCMakeFile( ast, qPrintable( tempName ) ); |
| 86 | // delete ast; |
| 87 | // QVERIFY( parseError == true ); |
| 88 | tempFile.remove(); |
| 89 | } |
| 90 | |
| 91 | void CMakeParserTest::testParserWithBadData_data() |
| 92 | { |