kirillbobyrev / pabi

🤖 [WIP] Monte-Carlo Tree Search chess engine
https://kirillbobyrev.github.io/pabi/docs/pabi/
GNU General Public License v3.0
13 stars 1 forks source link

Start using mocking for unit tests #216

Open kirillbobyrev opened 4 months ago

kirillbobyrev commented 4 months ago

Testing search and other parts of infra is incredibly challenging and exhausting. Maybe use mock testing for ensuring that the search works as expected.

This might prove to be challenging, though: probably requires some interface sacrifices (have to add traits and pollute the types a bit) and might be too tedious in the end (testing exactly how search works might not be needed).

https://github.com/asomers/mockall looks really good