UFO: Alien Invasion Issue Tracker
star_faded.png
Please log in to bookmark issues
enhancement_small.png
OPEN  Submit Patch #5434  -  improve CountSpawnpoints test
Posted Mar 06, 2015 - updated Mar 13, 2015
Issue details
  • Type of issue
    Submit Patch
  • Status
     
    Open
  • Assigned to
    Not assigned to anyone
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     shipit
  • Owned by
    Not owned by anyone
  • Category
    Not determined
  • Priority
    Not determined
  • Targetted for
    icon_milestones.png Not determined
Issue description
The test is very helpfull, but seems to be done in a hurry and/or left unfinished. As is, imo there are some problems with it, mainly:
1) It tests for dropship, even if the mapdef does not define any (in testCountSpawnpointsForMapWithAssembly).
2) If the mapdef defines multiplayer, only the multiplayer map is loaded and evaluated. Thus some singleplayer maps will never get testet. For multiplayer it loops through all defined gametypes, but only uses the values from he last orbit (in testCountSpawnpointsForMapWithAssemblyAndAircraftAndUfo).
I tried to improve the code, but my knowledge is very limited, so if somebody could take a look and give some feedback that would be very welcome.
Oc now the test loads every map combination possible, which is a huge number (~1000). I am not absolutly sure about that, but that seems what the original intention was.
Further, I would like to use the numteam values from the aircraft and UFO defs within the test (to replace magic numbers and other stuff). If I could get a hint how this could be achieved (if at all), this would be great. Without this, the test will report a lot of non-existent problems.