Commit 1252fdb
authored
[google_sign_in] Convert iOS tests to Swift (#10787)
Converts the existing native unit tests from Objective-C to Swift.
This was done as a few steps:
- Direct conversion of the existing code (first pass by Gemini, but I checked it over and did some fixup).
- Converted from XCTest to Swift Testing, for flutter/flutter#180787
- Replaced global state with new `loadGoogleServiceInfo` and `createTestPlugin` helpers, because there was no reason the test needed to be so stateful, and removing the state makes the test-specific setup easier to follow (e.g., a subset of the tests didn't actually use the test-global `plugin` instance, but instead replaced it with a local copy, which made things confusing when moving between tests). It also allows adding suites.
- Added suites for each method.
- Combined some tests into parameterized tests.
Part of flutter/flutter#119103
Part of flutter/flutter#180787
## Pre-Review Checklist
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.1 parent 2e46240 commit 1252fdb
File tree
13 files changed
+755
-884
lines changed- packages/google_sign_in/google_sign_in_ios
- darwin
- Tests
- google_sign_in_ios
- Sources/google_sign_in_ios/include
- google_sign_in_ios
- example
- ios
- Flutter
- Runner.xcodeproj
- macos/Runner.xcodeproj
13 files changed
+755
-884
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
0 commit comments