Skip to content

Commit

Permalink
fix(geoloc): added missing test case on geoloc accuracy management
Browse files Browse the repository at this point in the history
  • Loading branch information
rgoussu-exalt committed May 30, 2024
1 parent 46bb852 commit 885e22e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,10 @@ public void Geo_no_trigger() {
SensorContextTester context = CheckTestHelper.analyzeTestFile("checks/geolocalisation/Geolocalisation_no_trigger.swift");
assertThat(context.allIssues()).isEmpty();
}

@Test
public void Geo_no_trigger_on_desired_accuracy() {
SensorContextTester context = CheckTestHelper.analyzeTestFile("checks/geolocalisation/Geolocalisation_no_trigger_desired_accuracy.swift");
assertThat(context.allIssues()).isEmpty();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Foundation
import SwiftUI
import CLLocationManager

final class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {

// Should not trigger
CLLocationManager.desiredAccuracy = 2
return true
}
}

0 comments on commit 885e22e

Please sign in to comment.