Add a test for solverFormat().
ClosedPublic

Authored by shlomif on Sat, Feb 9, 2:06 PM.

Details

Summary

Make it part of the base class to facilitate testing.

Test Plan

run "make test" and test base functionality.

Diff Detail

Repository
R410 KPatience
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
shlomif created this revision.Sat, Feb 9, 2:06 PM
Restricted Application added a reviewer: KDE Games. · View Herald TranscriptSat, Feb 9, 2:06 PM
Restricted Application added a subscriber: kde-games-devel. · View Herald Transcript
shlomif requested review of this revision.Sat, Feb 9, 2:06 PM
yurchor added a subscriber: yurchor.Sat, Feb 9, 2:26 PM
yurchor added inline comments.
dealer.cpp
2106 ↗(On Diff #51253)

Typo: overrided -> overridden

shlomif updated this revision to Diff 51273.Sat, Feb 9, 4:58 PM

Convert to qCCritical and fix a typo.

aacid added a subscriber: aacid.Wed, Feb 13, 9:32 PM
aacid added inline comments.
dealer.cpp
2107 ↗(On Diff #51273)

make it pure virtual?

@aacid : re making it pure virtual that would require every subclass to supply it and it isn't needed or used by many of the game variant subclasses.

ah, right, it's a function you only call for golf.

Are you planning to extend this to other games? Otherwise you could just static_cast to Golf and call the function defined there without needing to add it to the base class.

@aacid : well, there are similar solverFormat() methods in Freecell and in Simple Simon, but they all can be non-virtual and I guess a static_cast will work.

shlomif updated this revision to Diff 51682.Thu, Feb 14, 2:21 PM
  • Avoid having a virtual solverFormat().
aacid accepted this revision.Sat, Feb 16, 11:04 AM
This revision is now accepted and ready to land.Sat, Feb 16, 11:04 AM
This revision was automatically updated to reflect the committed changes.