The configurable number of new words per practice session was not
counted correctly for gender, conjugation and comparison practice.
The above mentioned practice modes uses separate (pre-)grades for the
special word type subsets. These were not recognized by the old
counting algorithm. An improved practice mode dependent (pre-)grade
detection was introduced.
Details
- Reviewers
aacid - Group Reviewers
KDE Edu - Commits
- R340:07fccf921ab8: Fix faulty number of new words counting
Diff Detail
- Repository
- R340 Parley
- Branch
- fix_max_number_of_new_words_for_review (branched from master)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 11575 Build 11593: arc lint + arc unit
parley have a few autotests in the autotests folder.
Can you have a look to see if it would not be terribly hard adding an autotest for this?
- Autotests for bugfix were added
TestEntryTest is checking the new added methods in parles TestEntry
class. Because the behaviour of the new methods depends on parleys
current practice mode, the methods are called in all affected practice
modes.
SessionManagerFixedTest is aimed on the bug. The test is failing with
current master checkout and succeeding after applying the bugfix.
During the creation of the unit tests a failure in the bugfix showed
up and was corrected.
Unnecessary debug output, which disturbed the unit test output was
commented out.
autotests/sessionmanagerfixedtest.cpp | ||
---|---|---|
215 | This writes to parleys config file. If this is not allowed in automated testing, the sub test for conjugation practice mode has to be removed. |
autotests/sessionmanagerfixedtest.cpp | ||
---|---|---|
215 | right, changing peoples config when running tests is bad, but this should be hopefully be fixed by calling QStandardPaths::setTestModeEnabled(true); in initTestCase. Should the same be done for testentrytest.cpp ? |
- Prevent writing to config file while unit test run
Thanks for the hint with QStandardPaths::setTestModeEnabled(true) It works fine. Added it for testentrytest.cpp too, although it's not necessary there - just to make it bulletproof.
I'm not going to pretend i understand the code, but you wrote lots of unittests, so that's good, let's get this in :)