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

Method testParserWithBadData

plugins/cmake/tests/cmakeparsertest.cpp:72–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72void 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
91void CMakeParserTest::testParserWithBadData_data()
92{

Callers

nothing calls this directly

Calls 5

openMethod · 0.45
fileNameMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected