pivot-libre / tideman

Implementation of the Tideman ranked pairs algorithm
Apache License 2.0
9 stars 3 forks source link

Fixing RankedPairsGraph bugs #48

Closed carlschroedl closed 7 years ago

carlschroedl commented 7 years ago

I added some tests and squashed some bugs in the RankedPairsGraph class.

This PR addresses part of #44.

carlschroedl commented 7 years ago

Several of the methods in RankedPairsCalculator used to accept a Graph parameter. I thought that approach would make them easier to test. Writing tests revealed that I was wrong, so I removed those Graph params from the methods in favor of relying on the instance variable $this->graph and exposing the Graph to tests through a new public getGraph method;

coveralls commented 7 years ago

Coverage Status

Coverage increased (+14.2%) to 78.788% when pulling d5fda1a21ef15aca692e3d5e99fe7f8ea493c471 on carlschroedl:improveTestCoverage#44 into d2a92285ab6fa70f6d2c70f93f31f9a3187078f9 on pivot-libre:0.x.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+16.9%) to 81.481% when pulling 572e731856bcac7c1bec419636b601678a94a794 on carlschroedl:improveTestCoverage#44 into d2a92285ab6fa70f6d2c70f93f31f9a3187078f9 on pivot-libre:0.x.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+16.9%) to 81.544% when pulling 09558c6c0913c7a4cd72847637b482dc6248f447 on carlschroedl:improveTestCoverage#44 into 871aa088aacba4e268d44f50bbc1f43ed405a84d on pivot-libre:0.x.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+16.9%) to 81.544% when pulling d5f125da83c9db69bb2600961a7e307d161fa983 on carlschroedl:improveTestCoverage#44 into 871aa088aacba4e268d44f50bbc1f43ed405a84d on pivot-libre:0.x.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+16.9%) to 81.544% when pulling 2c16158f8a74e10f6b149c21d7d746ece77a0efd on carlschroedl:improveTestCoverage#44 into 871aa088aacba4e268d44f50bbc1f43ed405a84d on pivot-libre:0.x.

carlschroedl commented 7 years ago

This PR could also grow to address #49.