test sweep: cover src/editor/ tail paths (T-91)
test / unit + widget + golden + a11y (push) Failing after 33s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m2s

Adds 6 tests in test/editor/registry_test.dart closing out the
EditorRegistry methods the existing suite didn't reach:

- activate(id): unknown id is a no-op (no event emitted); known id
  flips the active buffer and emits editor.active-changed.
- setContent(id, content, selection?): explicit selection clamped to
  new content length, missing selection falls back to clamping the
  existing one, missing id is a silent no-op. Each emits the
  editor.edited replace event.
- contentFromArgs(args): the content_b64 fallback when text is
  absent, plus the empty-args default.
- Selection.hashCode + .toString.

Coverage: src/editor/buffer.dart 20/24 -> 24/24; src/editor/registry
.dart 87/105 -> 105/105. Both at 100%.

Total coverage 74.79% -> 75.11%; floor bumped to 75.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-13 06:37:14 +02:00
co-authored by Claude Opus 4.7
parent 7ad427bd88
commit 331201e287
2 changed files with 59 additions and 1 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ repository: https://github.com/postmeridiem/clide
# Pre-push line-coverage floor. Ratchets up only — see D-66.
# Reading: `awk -F: '/^coverage_floor:/ {gsub(/ /,"",$2); print $2}' pubspec.yaml`.
coverage_floor: 74
coverage_floor: 75
# Project metadata (was project.yaml, folded in per D-056).
# version: above is the single source of truth. The Makefile reads