Add a test for solverFormat().
ClosedPublic

Authored by shlomif on Feb 9 2019, 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
Branch
add-tests
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8292
Build 8310: arc lint + arc unit
shlomif created this revision.Feb 9 2019, 2:06 PM
Restricted Application added a reviewer: KDE Games. · View Herald TranscriptFeb 9 2019, 2:06 PM
Restricted Application added a subscriber: kde-games-devel. · View Herald Transcript
shlomif requested review of this revision.Feb 9 2019, 2:06 PM
yurchor added a subscriber: yurchor.Feb 9 2019, 2:26 PM
yurchor added inline comments.
dealer.cpp
2106 ↗(On Diff #51253)

Typo: overrided -> overridden

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

Convert to qCCritical and fix a typo.

aacid added a subscriber: aacid.Feb 13 2019, 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.Feb 14 2019, 2:21 PM
  • Avoid having a virtual solverFormat().
aacid accepted this revision.Feb 16 2019, 11:04 AM
This revision is now accepted and ready to land.Feb 16 2019, 11:04 AM
This revision was automatically updated to reflect the committed changes.