aboutsummaryrefslogtreecommitdiff
path: root/tests/test-org-drill-determine-next-interval-sm2.el
Commit message (Collapse)AuthorAgeFilesLines
* refactor: take card-state in org-drill-determine-next-interval-sm2Craig Jennings2026-05-271-46/+46
| | | | | | Stage 3 of #147. sm2 now takes (state quality) instead of seven positional args, binding the recall fields from the struct at the top so the algorithm body is unchanged. The smart-reschedule and hypothetical-next-review-date call sites pass the state they already hold, which drops the per-branch accessor unpacking. I kept the return as the existing positional list rather than restructuring it too. The goal is reducing the input signature, and changing the return shape would force the shared test extractors and every return-read to change for no real gain. A testutil adapter, test-scheduler--call-sm2, packs positional args into the struct, so the test call sites stay readable as the documented algorithm inputs and the migration is a one-symbol rename per call.
* fix: guard sm2 cl-assert error tests behind Emacs-30 skipCraig Jennings2026-05-271-6/+23
| | | | | | The three error-case tests in test-org-drill-determine-next-interval-sm2.el asserted their cl-assert preconditions with a bare should-error :type 'cl-assertion-failed. On Emacs 29, ERT installs a signal-hook that keeps should-error from matching the condition, so the tests failed the 29.4 job outright. Under undercover's edebug instrumentation the same assert dropped into a blocking debugger in batch mode, which hung the coverage job until the 6-hour timeout on every push. The sm5 and simple8 files already wrap their equivalent error tests in a skip-unless guard for this quirk. I copied that helper into sm2 so all three scheduler files handle Emacs 29 the same way.
* chore: coverage, autoload fix, and internal cleanup for org-drillCraig Jennings2026-05-261-0/+21
| | | | | | | | | | | | | | | | A batch of test-coverage and hardening work, squashed from the test-work branch. Tests: deduplicated a colliding leitner-capture test name so make test-name loads again. Added SM2 assert-failure cases, the six basic multicloze variant delegations, the three English-side spanish-verb branches, and org-drill-current-scope branch coverage. Fix: the entry-point commands (org-drill itself, cram-tree, tree, directory, resume, relearn-item, strip-all-data, merge-buffers) carried no autoload cookies, so M-x failed from a fresh install until something pulled the file in. They're autoloaded now. Perf: org-drill-shuffle was quadratic because it indexed a list with elt on every swap. It runs a linear Fisher-Yates pass over a vector now, and it checks its argument is a list. Feat: added org-drill-version, a constant plus an interactive command, so a bug reporter doesn't have to open the file header. Refactor: extracted org-drill--format-tense-mood, shared by the two verb-conjugation presenters that each carried a copy. Docs: explained the SM8 magic numbers in the simple8 helpers as empirical fits rather than tunable knobs.
* refactor: extract shared scheduler test extractorsCraig Jennings2026-04-291-85/+63
| | | | | | | | Three test files (SM2, SM5, and the upcoming Simple8) all extract the same fields from a scheduler result list. Pull the shared extractors into tests/testutil-scheduler.el so each algorithm's test file can use them. Position 2 holds an EF in SM2 and SM5 and an EASE in Simple8. Both names are exposed as aliases pointing at the same nth position so each call site reads accurately. SM2 and SM5 test files now require testutil-scheduler and call the shared helpers. 69 of 69 scheduler tests still green. Full unit suite at 180 of 180.
* test: Add boundary, error, and edge case testsCraig Jennings2025-11-131-0/+136
| | | | | | | | Added 66 comprehensive tests covering: - Entry detection with extreme values and Unicode - SM2 algorithm with boundary conditions - Workflow error handling with malformed data - Card types with complex content structures
* test: Add Phase 1 foundation tests for critical functionsCraig Jennings2025-11-131-0/+307
- Add unit tests for org-drill-entry-p (14 tests) - Add unit tests for org-drill-part-of-drill-entry-p (14 tests) - Add unit tests for SM2 scheduling algorithm (23 tests) - Add integration test for basic drill workflow (11 tests) - Update Makefile to support test-*.el naming pattern - Rename org-drill-test.el to test-org-drill.el for consistency Total: 65 tests, all passing