| 24 | } |
| 25 | |
| 26 | void CMakeParserTest::testLexerWithFile() |
| 27 | { |
| 28 | QTemporaryFile tempFile; |
| 29 | tempFile.setAutoRemove( false ); |
| 30 | tempFile.open(); |
| 31 | if ( !QFile::exists( tempFile.fileName() ) ) |
| 32 | QFAIL( "Unable to open temporary file" ); |
| 33 | |
| 34 | QString tempName = tempFile.fileName(); |
| 35 | tempFile.close(); //hacks to the get name of the file |
| 36 | |
| 37 | cmListFileLexer* lexer = cmListFileLexer_New(); |
| 38 | if ( !lexer ) |
| 39 | QFAIL( "unable to create lexer" ); |
| 40 | QVERIFY( cmListFileLexer_SetFileName( lexer, qPrintable( tempName ), nullptr ) ); |
| 41 | cmListFileLexer_Delete( lexer ); |
| 42 | tempFile.remove(); |
| 43 | } |
| 44 | |
| 45 | void CMakeParserTest::testParserWithGoodData() |
| 46 | { |
nothing calls this directly
no test coverage detected