Skip to content

Add tests for mix sharing and routines; repair Xcode project - #10

Merged
alexandre-wayss merged 1 commit into
mainfrom
test/mix-sharing-routines
Sep 22, 2026
Merged

alexandre-wayss merged 1 commit into
mainfrom
test/mix-sharing-routines

Conversation

@alexandre-wayss

Copy link
Copy Markdown
Collaborator

Summary

  • New Scripts/test.sh: builds the app sources together with a small dependency-free test runner (plain swiftc, same as the app build) and runs 28 tests:
    • MixSharing: link and file round-trips, dropping imported/silent sounds, level clamping and rounding, rejecting unknown versions, unknown sounds, oversized or garbage payloads, other URL schemes, name cleaning.
    • RoutineSchedule: weekdays, next run, occurrences across days, the 15-minute catch-up window after sleep, disabled routines, day labels, and templates only using sounds that exist.
  • @main moved to Sources/Main.swift so the tests can reuse every other source file.
  • Fix: project.pbxproj had entries appended after its closing brace since the Pomodoro widget commit, so Xcode could not open the project. They are now in their proper sections (plus Main.swift).
  • CI runs the tests after building.

How it was tested

  • ./Scripts/test.sh: 28 passed. Changing the catch-up window makes a test fail and the script exit 1.
  • ./Scripts/build.sh and xcodebuild both build the app.

- Scripts/test.sh compiles the app sources with a small test runner and
  runs 28 tests for MixSharing (round-trips, validation of incoming mixes,
  name cleaning, base64url) and RoutineSchedule (next run, catch-up window,
  weekdays, templates)
- Move @main into Main.swift so tests can reuse every other source file
- project.pbxproj had entries appended after its closing brace, so Xcode
  could not open the project; move them into their sections and add Main.swift
- CI runs the tests after the build
@alexandre-wayss
alexandre-wayss merged commit 43783e8 into main Sep 22, 2026
1 check passed
@alexandre-wayss
alexandre-wayss deleted the test/mix-sharing-routines branch September 22, 2026 19:51
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.

1 participant