Add tests for mix sharing and routines; repair Xcode project - #10
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scripts/test.sh: builds the app sources together with a small dependency-free test runner (plainswiftc, same as the app build) and runs 28 tests:@mainmoved toSources/Main.swiftso the tests can reuse every other source file.project.pbxprojhad 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 (plusMain.swift).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.shandxcodebuildboth build the app.