| 266 | } |
| 267 | |
| 268 | void TestTemplateClassGenerator::cppOutput() |
| 269 | { |
| 270 | auto generator = loadTemplate(QStringLiteral("test_cpp")); |
| 271 | RETURN_IF_TEST_FAILED(); |
| 272 | setLowercaseFileNames(generator); |
| 273 | |
| 274 | DocumentChangeSet changes = generator->generate(); |
| 275 | changes.setFormatPolicy(DocumentChangeSet::NoAutoFormat); |
| 276 | changes.applyAllChanges(); |
| 277 | |
| 278 | QFile header(baseUrl.resolved(QUrl(QStringLiteral("classname.h"))).toLocalFile()); |
| 279 | QVERIFY(header.open(QIODevice::ReadOnly)); |
| 280 | |
| 281 | QFile testHeader(QStringLiteral(CODEGEN_TESTS_EXPECTED_DIR "/classname.h")); |
| 282 | testHeader.open(QIODevice::ReadOnly); |
| 283 | COMPARE_FILES(header, testHeader); |
| 284 | |
| 285 | QFile implementation(baseUrl.resolved(QUrl(QStringLiteral("classname.cpp"))).toLocalFile()); |
| 286 | QVERIFY(implementation.open(QIODevice::ReadOnly)); |
| 287 | |
| 288 | QFile testImplementation(QStringLiteral(CODEGEN_TESTS_EXPECTED_DIR "/classname.cpp")); |
| 289 | testImplementation.open(QIODevice::ReadOnly); |
| 290 | COMPARE_FILES(implementation, testImplementation); |
| 291 | } |
| 292 | |
| 293 | void TestTemplateClassGenerator::yamlOutput() |
| 294 | { |
nothing calls this directly
no test coverage detected