Skip to content

test: shared Windows/Mac fixtures for view math, zoom controller and view owner - #547

Merged
Maxaubert merged 3 commits into
mainfrom
test/shared-fixtures
Nov 4, 2026
Merged

Maxaubert merged 3 commits into
mainfrom
test/shared-fixtures

Conversation

@Maxaubert

Copy link
Copy Markdown
Owner

Closes #546.

What

  • tests/fixtures/shared/: view_math_cases.txt (clamp, edge pan with cursor bodies, track target, key pan speed, still view), zoom_controller_cases.txt (direction, notch step, quick zoom, hold, clamps, release ease-out, accel ramp, wheel targets), view_owner_cases.txt (StepViewOwner step sequences). One case per line, = tokens are expectations, fixed tolerance 1e-6 (documented in each header).
  • C++ reader: tests/test_shared_fixtures.cpp (doctest, no <windows.h>; picked up by build.bat's tests\*.cpp). Runs all and win rows; WIND_UPDATE_FIXTURES=1 rewrites them from the C++ code.
  • Swift reader: mac/Tests/WindCoreChecks/SharedFixtures.swift, registered in main.swift; finds the folder four levels up from #filePath. Runs all and mac rows.
  • mac.yml: push and pull_request path filters include tests/fixtures/shared/**.
  • Docs: chapter 11 and mac/docs/architecture.md.

Deliberate differences (per-platform rows, not forced to agree)

  • Wheel glide: Windows first-order in log space (tau 80 ms) vs Mac spring (250 ms). 1x to 1.189x notch at 50 / 100 / 200 ms: Windows 1.0839 / 1.1316 / 1.1724, Mac 1.0432 / 1.1027 / 1.1670. Both end exactly on the target (shared rows).
  • Key pan speed (desktop px/s, 1920 wide, speed 1): Windows 746.7 / 565.7 / 425.4 / 299.1 / 235.1 / 80.0 at 1x / 2x / 4x / 7.5x / 10x / 30x; Mac 1200 / 900 / 600 / 320 / 240 / 80.
  • setLevel(2) 5 ticks into the release ease-out: Windows 2.0876 (rate keeps decaying), Mac 2 (setLevel stops it).
  • stillViewTarget is Mac-only; Windows EdgePanCenter's MPO wall is not ported (shared rows pass -1).

Tests

  • build.bat test: 675/675 test cases pass.
  • The Mac side was checked here against a Python transcription of the Swift code (all 124 all/mac rows agree); the mac job is the real check.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kg7JN6HgdB9FaHJsgLxovP

Maxaubert and others added 3 commits November 4, 2026 22:51
…view owner (#546)

tests/fixtures/shared/ holds language-neutral cases (one per line, tagged all/win/mac) that
tests/test_shared_fixtures.cpp and mac/Tests/WindCoreChecks/SharedFixtures.swift both run. The all
and win values come from the C++ code; WIND_UPDATE_FIXTURES=1 rewrites them. Deliberate differences
(the wheel glide path, keyboard pan speed, setLevel during the ease-out, the Mac-only still view) are
per-platform rows. mac.yml now also runs on changes to the shared folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kg7JN6HgdB9FaHJsgLxovP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kg7JN6HgdB9FaHJsgLxovP
@Maxaubert
Maxaubert force-pushed the test/shared-fixtures branch from 631c8b7 to 8b5ed72 Compare November 4, 2026 21:52
@Maxaubert
Maxaubert merged commit b5e8941 into main Nov 4, 2026
2 checks passed
@Maxaubert
Maxaubert deleted the test/shared-fixtures branch November 4, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared test fixtures for the Windows and Mac view math, zoom controller and view owner

1 participant