| 43 | } |
| 44 | |
| 45 | void CMakeParserTest::testParserWithGoodData() |
| 46 | { |
| 47 | // QFAIL( "the magic is missing" ); |
| 48 | QFETCH( QString, text ); |
| 49 | QTemporaryFile tempFile; |
| 50 | tempFile.setAutoRemove( false ); |
| 51 | tempFile.open(); |
| 52 | if ( !QFile::exists( tempFile.fileName() ) ) |
| 53 | QFAIL( "Unable to open temporary file" ); |
| 54 | |
| 55 | tempFile.write( text.toUtf8() ); |
| 56 | QString tempName = tempFile.fileName(); |
| 57 | tempFile.close(); //hacks to the get name of the file |
| 58 | const bool parseError = CMakeListsParser::readCMakeFile( tempName ).isEmpty(); |
| 59 | QVERIFY( parseError == false ); |
| 60 | tempFile.remove(); |
| 61 | } |
| 62 | |
| 63 | void CMakeParserTest::testParserWithGoodData_data() |
| 64 | { |