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

Method testParserWithGoodData

plugins/cmake/tests/cmakeparsertest.cpp:45–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void 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
63void CMakeParserTest::testParserWithGoodData_data()
64{

Callers

nothing calls this directly

Calls 7

readCMakeFileFunction · 0.85
openMethod · 0.45
fileNameMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45
isEmptyMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected