Blizzard / s2client-api

StarCraft II Client - C++ library supported on Windows, Linux and Mac designed for building scripted bots and research using the SC2API.
MIT License
1.66k stars 282 forks source link

`Test_snapshots` assertion error on line 52: Cannot find terran scv #315

Open peter-cudmore opened 5 years ago

peter-cudmore commented 5 years ago

Issue

Test_Snapshot raises assertion error on line 52 of test_snapshot.cc during the test class TestSnapshot3.

Setup

Visual Studio 2019. Latest client (74741). Latest master branch of s2client-api (including new protocols)

Comments

I'm attempting to fix the sc2api for the latest client.

I'm pretty sure the problem is in how the raw observation data is piped in and then used to update the unit-pool (lines 582--595 of sc2-client.cc). For some reason, after the first two test cases have passed (where ObservationImp->unit_pool_ member is populated with a total of 5 neutral and allied units), during the update prior to calling TestSnapshop3, only one unit is put into that pool.

For reference, the observation unit test class Test_observation_interface.cc pass just fine (though there are problems transitioning between test suites, but that's for another day).

suoni414 commented 5 years ago

You may need to see #306。

mboedigh commented 5 years ago

i believe suoni414 is right, but there was another change or two that was needed as well to get past some later tests.

peter-cudmore commented 5 years ago

fixed on PR #316 Unit tests are now passing.