| 483 | } |
| 484 | |
| 485 | inline void performModelNodeTest(const std::string& testProjectPath, const std::string& modelPath, int expectedPolyCount) |
| 486 | { |
| 487 | auto funcStatic = algorithm::createEntityByClassName("func_static"); |
| 488 | scene::addNodeToContainer(funcStatic, GlobalMapModule().getRoot()); |
| 489 | EXPECT_FALSE(algorithm::findChildModel(funcStatic)) << "No ModelNode expected after creating the entity"; |
| 490 | |
| 491 | EXPECT_TRUE(os::fileOrDirExists(testProjectPath + modelPath)); |
| 492 | |
| 493 | funcStatic->getEntity().setKeyValue("model", modelPath); |
| 494 | |
| 495 | auto model = algorithm::findChildModel(funcStatic); |
| 496 | EXPECT_TRUE(model) << "No ModelNode after assigning a model path"; |
| 497 | |
| 498 | EXPECT_EQ(model->getIModel().getModelPath(), modelPath); |
| 499 | EXPECT_EQ(model->getIModel().getPolyCount(), expectedPolyCount); |
| 500 | } |
| 501 | |
| 502 | // Setting the model key to point to an .ASE model should work |
| 503 | TEST_F(ModelTest, ModelKeyReferencesAseModel) |
no test coverage detected