Asserts that the changes to the target map have not been reverted
| 1599 | |
| 1600 | // Asserts that the changes to the target map have not been reverted |
| 1601 | void verifyTargetChanges1(const scene::IMapRootNodePtr& targetRoot) |
| 1602 | { |
| 1603 | EXPECT_TRUE(algorithm::getEntityByName(targetRoot, "light_3")); // light_3 has been added |
| 1604 | EXPECT_TRUE(algorithm::findFirstBrushWithMaterial(algorithm::findWorldspawn(targetRoot), "textures/numbers/17")); // brush_17 been added to worldspawn |
| 1605 | auto func_static_7 = algorithm::getEntityByName(targetRoot, "func_static_7"); |
| 1606 | EXPECT_TRUE(algorithm::findFirstBrushWithMaterial(func_static_7, "textures/numbers/9")); // brush_7 in func_static_7 retextured to brush 9 |
| 1607 | EXPECT_EQ(Node_getEntity(algorithm::getEntityByName(targetRoot, "expandable"))->getKeyValue("target_spawnarg"), "target_value"); |
| 1608 | EXPECT_EQ(Node_getEntity(algorithm::getEntityByName(targetRoot, "expandable"))->getKeyValue("extra2"), ""); |
| 1609 | EXPECT_EQ(Node_getEntity(algorithm::getEntityByName(targetRoot, "expandable"))->getKeyValue("origin"), "-100 350 32"); |
| 1610 | EXPECT_FALSE(algorithm::findFirstBrushWithMaterial(algorithm::findWorldspawn(targetRoot), "textures/numbers/4")); // both brush_4 have been deleted from worldspawn |
| 1611 | EXPECT_FALSE(algorithm::findFirstBrushWithMaterial(algorithm::findWorldspawn(targetRoot), "textures/numbers/3")); // func_static_3 had two brush_3 added (were part of worldspawn before) |
| 1612 | |
| 1613 | auto func_static_3 = algorithm::getEntityByName(targetRoot, "func_static_3"); |
| 1614 | auto func_static_3_childCount = algorithm::getChildCount(func_static_3, algorithm::brushHasMaterial("textures/numbers/3")); |
| 1615 | EXPECT_EQ(func_static_3_childCount, 4); |
| 1616 | |
| 1617 | EXPECT_TRUE(algorithm::findFirstBrushWithMaterial(algorithm::findWorldspawn(targetRoot), "textures/numbers/12")); // brush_12 got moved to the left |
| 1618 | |
| 1619 | auto entity_to_be_moved = algorithm::getEntityByName(targetRoot, "entity_to_be_moved"); |
| 1620 | EXPECT_EQ(algorithm::getChildCount(entity_to_be_moved), 2) << "entity_to_be_moved should have two child primitives"; |
| 1621 | EXPECT_TRUE(algorithm::findFirstBrushWithMaterial(entity_to_be_moved, "textures/numbers/18")); // one brush with texture 18 |
| 1622 | EXPECT_TRUE(algorithm::findFirstPatchWithMaterial(entity_to_be_moved, "textures/numbers/18")); // one patch with texture 18 |
| 1623 | } |
| 1624 | |
| 1625 | TEST_F(ThreeWayMergeTest, NonconflictingEntityAddition) |
| 1626 | { |
no test coverage detected