lbryio / lbrycrd

The blockchain that provides the digital content namespace for the LBRY protocol
https://lbry.com
MIT License
2.57k stars 178 forks source link

Add/reorganize unit tests for CClaimTrieCache/CClaimTrie #104

Closed kaykurokawa closed 5 years ago

kaykurokawa commented 6 years ago

We have decent coverage for integration testing the CClaimTrieCache together with CClaimTrie but we do not have any unit tests for testing them separately.

Especially for CClaimTrieCache, adding unit tests would help developers understand and debug the class. We'll have better confidence on the correctness of the code going forward.

Acceptance Criteria

1. 2. 3.

Definition of Done

kaykurokawa commented 6 years ago

Some tests were added here: https://github.com/lbryio/lbrycrd/pull/105 but could use more

BrannonKing commented 6 years ago

Waiting on #175 's proposed "separate PRs".

BrannonKing commented 6 years ago

Having combined the two claimtrie unit test files as part of my other story to reuse unit test framework, I now agree with @lbrynaut 's comment about that being a bad move; I should have moved the unit test framework into its own file instead. The one unit test file is just too large (now knocking on 4k lines); it needs to be split into a number of smaller files.

bvbfan commented 5 years ago

316