| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attempt 4 at making the eight scheduler error tests pass on
Emacs 29.4 in CI.
The earlier approaches kept failing because ERT 29.4 installs
ert--should-signal-hook as signal-hook-function around the entire
ert-deftest body — not just inside should forms. That hook fires
on every signal before any inner condition-case can catch it,
which is why even a bare (condition-case ... (cl-assertion-failed
nil)) at the top of the test body didn't work.
The new helper rebinds signal-hook-function to nil inside its own
let-scope, so condition-case catches the cl-assertion-failed
signal normally. The ert-fail on the no-error path runs outside
that shadowing scope, so it still routes through ERT's failure
handling.
Locally green; pushing to test 29.4 in CI.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous fix wrapped condition-case in (should (eq 'caught ...)),
but ERT in Emacs 29.4 installs signal-hook-function around should
forms — that hook fires on every signal, intercepting them before
the inner condition-case can catch. CI on 29.4 still failed.
This iteration drops should entirely. Each test body becomes a
plain condition-case at the top level: run the form, and if it
returns normally, ert-fail. Catch cl-assertion-failed by name
rather than via the error parent — its parent-class registration
is inconsistent across Emacs versions, but the symbol-name match
through condition-case always works.
Locally green; let's see what 29.4 does with it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The :type 'cl-assertion-failed' fix didn't help — Emacs 29.4 in CI
still marks the eight scheduler error tests as failures even though
the cl-assertion-failed signal clearly fires (visible in the
test-failure backtrace).
Whatever ERT's should-error is doing in 29.4, it isn't accepting
the signal as a pass. Replacing should-error with a manual
condition-case wrapped in should sidesteps the fragility — we
just verify SOMETHING was signalled, which is all the test ever
needed.
Extracted as a test-scheduler--should-cl-assert helper macro in
each file (the two test files don't share infrastructure right
now).
Locally green; expected to clear the 29.4 CI failure.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CI on Emacs 29.4 failed eight scheduler :error: tests (5 in
Simple8, 3 in SM5). All eight wrap a function call that violates
a cl-assert precondition and use bare (should-error ...) to catch
the resulting cl-assertion-failed signal.
The same tests pass locally (Emacs 30.2) and in CI on Emacs
snapshot. Hypothesis: in 29.4 cl-assertion-failed isn't registered
with error as a parent class, so the default should-error filter
(which catches type 'error') doesn't match. Adding an explicit
:type 'cl-assertion-failed' tells should-error exactly what
condition to expect, avoiding the inheritance-class question
entirely.
Locally still green; expected to clear the CI failure on the next
push.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
The SM5 algorithm at org-drill-determine-next-interval-sm5 had no direct test coverage. SM2 has 37 tests. SM5 has zero. Adds a per-function test file that mirrors the SM2 file's structure. 32 tests cover Normal, Boundary, Error, and algorithm-verification categories.
The SM5-specific surface gets dedicated coverage. Failure preserves the input EF, not the modified one. The of-matrix is copied, not mutated. The four delta-days configurations (nil, positive, negative-with-flag, negative-without-flag) each take a different code path. The Error category includes should-error cases for the cl-assert preconditions on n and quality, which is a gap SM2's tests still have.
All 32 pass on first run as characterization. Full suite at 180 of 180.
|