|
|
@@ -12,15 +12,12 @@ import Testing
|
|
|
// Note: This test case can only test one timezone per invocation
|
|
|
// so you need to manually change this to try out errors from
|
|
|
// different timezones
|
|
|
- let testingTimezone = "Europe/Berlin"
|
|
|
+ let testingTimezone = ReplayTests.timezone
|
|
|
let files = try await HttpFiles.listFiles()
|
|
|
- var skippedTimezones = Set<String>()
|
|
|
for filePath in files {
|
|
|
let algorithmComparison = try await HttpFiles.downloadFile(at: filePath)
|
|
|
print("Checking \(filePath) @ \(algorithmComparison.createdAt)")
|
|
|
guard algorithmComparison.timezone == testingTimezone else {
|
|
|
- print("Skipping timezone \(algorithmComparison.timezone)")
|
|
|
- skippedTimezones.insert(algorithmComparison.timezone)
|
|
|
continue
|
|
|
}
|
|
|
guard let mealInputs = algorithmComparison.mealInput else {
|
|
|
@@ -40,15 +37,6 @@ import Testing
|
|
|
print("Checked \(filePath) \(algorithmComparison.timezone)")
|
|
|
timeZoneForTests.resetTimezone()
|
|
|
}
|
|
|
-
|
|
|
- if skippedTimezones.isEmpty {
|
|
|
- print("Didn't skip any timezones")
|
|
|
- } else {
|
|
|
- print("Skipped timezones:")
|
|
|
- for timezone in skippedTimezones {
|
|
|
- print(" - \(timezone)")
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
func checkFixedJsAgainstSwift(mealInputs: MealInputs) async throws {
|