| 294 | } |
| 295 | |
| 296 | inline void runConverterCode(const std::string& inputPath, const std::string& outputPath) |
| 297 | { |
| 298 | auto extension = string::to_upper_copy(os::getExtension(outputPath)); |
| 299 | |
| 300 | EXPECT_FALSE(fs::exists(outputPath)) << outputPath << " already exists"; |
| 301 | |
| 302 | // Invoke the converter code |
| 303 | GlobalCommandSystem().executeCommand("ConvertModel", cmd::ArgumentList{ inputPath, outputPath, extension }); |
| 304 | |
| 305 | EXPECT_TRUE(fs::exists(outputPath)) << outputPath << " should have been created"; |
| 306 | |
| 307 | auto importer = GlobalModelFormatManager().getImporter(extension); |
| 308 | auto exportedModel = importer->loadModelFromPath(outputPath); |
| 309 | |
| 310 | EXPECT_TRUE(exportedModel); |
| 311 | EXPECT_EQ(exportedModel->getSurfaceCount(), 3); |
| 312 | EXPECT_EQ(exportedModel->getVertexCount(), 180); |
| 313 | EXPECT_EQ(exportedModel->getPolyCount(), 258); |
| 314 | } |
| 315 | |
| 316 | TEST_F(ModelExportTest, ConvertLwoToAse) |
| 317 | { |
no test coverage detected