Skip to content

Conversation

@MosheBerman
Copy link
Owner

Adds automated tests to KosherCocoa.

Details

  • Defines aDynamicTests class. (It works by adding methods to the test class at runtime.)
  • Implement subclass to test NOAACalculatorTests.
    • Loads a CSV export of KosherJava's calendar generator
    • Iterates the dates in the CSV (Gregorian year 2023) for Lakewood NJ.
    • Calculates sunrise at elevation, seaLevelSunrise, sunset at elevation and seaLevelSunset.
    • Compares to the values in the CSV, with a 1 second margin of error.
    • To reduce runtime, the tests iterate with Swift's stride method, running the tests on every N days.

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.

Unit test astronomical calculations.

2 participants