Fix faulty number of new words counting
Needs ReviewPublic

Authored by hriesenbeck on Nov 26 2018, 8:55 PM.

Details

Reviewers
None
Group Reviewers
KDE Edu
Summary

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.

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
hriesenbeck created this revision.Nov 26 2018, 8:55 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptNov 26 2018, 8:55 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
hriesenbeck requested review of this revision.Nov 26 2018, 8:55 PM

Missed to set a reviewer.

aacid added a subscriber: aacid.Sun, Apr 28, 4:11 PM

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?

hriesenbeck updated this revision to Diff 57609.Sun, May 5, 7:59 PM
  • 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.

hriesenbeck added inline comments.Sun, May 5, 8:04 PM
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.
The writing to config file is necessary because parley EntryFilter class loads the document specific preferences from disk. The tenses for conjugation practice are document specific and needed for this test.

aacid added inline comments.Thu, May 16, 9:16 PM
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 ?