MCPcopy Create free account
hub / github.com/KDE/kdevelop / testLexerWithFile

Method testLexerWithFile

plugins/cmake/tests/cmakeparsertest.cpp:26–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void 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
45void CMakeParserTest::testParserWithGoodData()
46{

Callers

nothing calls this directly

Calls 7

cmListFileLexer_NewFunction · 0.85
cmListFileLexer_DeleteFunction · 0.85
openMethod · 0.45
fileNameMethod · 0.45
closeMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected