[local_auth_darwin] Migrate XCTest to Swift Testing#10802
Merged
auto-submit[bot] merged 2 commits intoflutter:mainfrom Jan 16, 2026
Merged
[local_auth_darwin] Migrate XCTest to Swift Testing#10802auto-submit[bot] merged 2 commits intoflutter:mainfrom
auto-submit[bot] merged 2 commits intoflutter:mainfrom
Conversation
19 tasks
jmagman
commented
Jan 16, 2026
| @MainActor | ||
| func testFailedAuthWithErrorBiometricLockout() { | ||
| @Test(arguments: [ | ||
| (LAError.biometryLockout, AuthResult.biometryLockout), |
There was a problem hiding this comment.
Code Review
This pull request successfully migrates the local_auth_darwin tests from XCTest to the new Swift Testing framework. The changes are well-executed, leveraging modern features like parameterized tests with @Test(arguments:) to significantly reduce boilerplate and improve test clarity. The adoption of async/await with withCheckedContinuation for handling asynchronous callbacks is also a great improvement. I've left a couple of minor suggestions to fix typos in test function names. Overall, this is an excellent modernization of the test suite.
| @MainActor | ||
| func testSuccessfullAuthWithBiometrics() throws { | ||
| @Test | ||
| func successfullAuthWithBiometrics() async { |
packages/local_auth/local_auth_darwin/darwin/Tests/FLALocalAuthPluginTests.swift
Outdated
Show resolved
Hide resolved
LouiseHsu
approved these changes
Jan 16, 2026
Contributor
LouiseHsu
left a comment
There was a problem hiding this comment.
The amount of lines removed 😻
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jan 19, 2026
github-merge-queue bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Jan 19, 2026
flutter/packages@c1b1183...0af5736 2026-01-16 [email protected] [two_dimensional_scrollables] Delete iOS and macOS placeholder tests (flutter/packages#10801) 2026-01-16 [email protected] [local_auth_darwin] Migrate XCTest to Swift Testing (flutter/packages#10802) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
ivan-vanyusho
pushed a commit
to ivan-vanyusho/packages
that referenced
this pull request
Jan 26, 2026
Part of flutter/flutter#180787 ``` ◇ Test run started. ↳ Testing Library Version: 102 (arm64-apple-ios13.0-simulator) ◇ Suite LocalAuthPluginTests started. ◇ Test failedAuthWithEvaluateError(errorCode:expectedResult:expectBiometrics:) started. ◇ Test getEnrolledBiometricsWithTouchID() started. ◇ Test successfullAuthWithBiometrics() started. ◇ Test deviceSupportsBiometrics_withEnrolledHardware() started. ◇ Test deviceSupportsBiometrics_withBiometryNotAvailable() started. ◇ Test deviceSupportsBiometrics_withNonEnrolledHardware() started. ◇ Test failedAuthWithCanEvaluateError(error:expectedResult:) started. ◇ Test localizedFallbackTitle() started. ◇ Test deviceSupportsBiometrics_withBiometryNotAvailableWhenPermissionsDenied() started. ◇ Test successfullAuthWithoutBiometrics() started. ◇ Test getEnrolledBiometricsWithoutEnrolledHardware() started. ◇ Test skippedLocalizedFallbackTitle() started. ◇ Test isDeviceSupportedHandlesSupported() started. ◇ Passing 3 arguments errorCode → -9, expectedResult → .appCancel, expectBiometrics → false to failedAuthWithEvaluateError(errorCode:expectedResult:expectBiometrics:) ◇ Test getEnrolledBiometricsWithFaceID() started. ◇ Passing 3 arguments errorCode → -1, expectedResult → .authenticationFailed, expectBiometrics → true to failedAuthWithEvaluateError(errorCode:expectedResult:expectBiometrics:) ◇ Passing 3 arguments errorCode → -4, expectedResult → .systemCancel, expectBiometrics → false to failedAuthWithEvaluateError(errorCode:expectedResult:expectBiometrics:) ◇ Passing 3 arguments errorCode → 99, expectedResult → .unknownError, expectBiometrics → false to failedAuthWithEvaluateError(errorCode:expectedResult:expectBiometrics:) ◇ Passing 3 arguments errorCode → -2, expectedResult → .userCancel, expectBiometrics → false to failedAuthWithEvaluateError(errorCode:expectedResult:expectBiometrics:) ◇ Passing 3 arguments errorCode → -3, expectedResult → .userFallback, expectBiometrics → false to failedAuthWithEvaluateError(errorCode:expectedResult:expectBiometrics:) ◇ Passing 3 arguments errorCode → -1, expectedResult → .authenticationFailed, expectBiometrics → false to failedAuthWithEvaluateError(errorCode:expectedResult:expectBiometrics:) ◇ Passing 2 arguments error → LAError(rawValue: -8), expectedResult → .biometryLockout to failedAuthWithCanEvaluateError(error:expectedResult:) ◇ Passing 2 arguments error → LAError(rawValue: -6), expectedResult → .biometryNotAvailable to failedAuthWithCanEvaluateError(error:expectedResult:) ◇ Test isDeviceSupportedHandlesUnsupported() started. ◇ Passing 2 arguments error → LAError(rawValue: -7), expectedResult → .biometryNotEnrolled to failedAuthWithCanEvaluateError(error:expectedResult:) ◇ Passing 2 arguments error → LAError(rawValue: -10), expectedResult → .invalidContext to failedAuthWithCanEvaluateError(error:expectedResult:) ◇ Passing 2 arguments error → LAError(rawValue: -5), expectedResult → .passcodeNotSet to failedAuthWithCanEvaluateError(error:expectedResult:) ◇ Passing 2 arguments error → LAError(rawValue: -1004), expectedResult → .notInteractive to failedAuthWithCanEvaluateError(error:expectedResult:) ✔ Test getEnrolledBiometricsWithTouchID() passed after 0.041 seconds. ✔ Test deviceSupportsBiometrics_withBiometryNotAvailable() passed after 0.041 seconds. ✔ Test deviceSupportsBiometrics_withBiometryNotAvailableWhenPermissionsDenied() passed after 0.041 seconds. ✔ Test deviceSupportsBiometrics_withNonEnrolledHardware() passed after 0.041 seconds. ✔ Test isDeviceSupportedHandlesSupported() passed after 0.041 seconds. ✔ Test getEnrolledBiometricsWithoutEnrolledHardware() passed after 0.041 seconds. ✔ Test deviceSupportsBiometrics_withEnrolledHardware() passed after 0.041 seconds. ✔ Test failedAuthWithCanEvaluateError(error:expectedResult:) passed after 0.041 seconds. ✔ Test getEnrolledBiometricsWithFaceID() passed after 0.041 seconds. ✔ Test successfullAuthWithBiometrics() passed after 0.041 seconds. ✔ Test isDeviceSupportedHandlesUnsupported() passed after 0.002 seconds. ✔ Test successfullAuthWithoutBiometrics() passed after 0.042 seconds. ✔ Test failedAuthWithEvaluateError(errorCode:expectedResult:expectBiometrics:) passed after 0.042 seconds. ✔ Test skippedLocalizedFallbackTitle() passed after 0.042 seconds. ✔ Test localizedFallbackTitle() passed after 0.042 seconds. ✔ Suite LocalAuthPluginTests passed after 0.042 seconds. ✔ Test run with 15 tests passed after 0.042 seconds. ``` https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8692498766458966161/+/u/Run_package_tests/native_test/stdout Adding CHANGELOG override per flutter#10761 (comment) ## Pre-Review Checklist **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^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.
flutter-zl
pushed a commit
to flutter-zl/flutter
that referenced
this pull request
Feb 10, 2026
…r#181150) flutter/packages@c1b1183...0af5736 2026-01-16 [email protected] [two_dimensional_scrollables] Delete iOS and macOS placeholder tests (flutter/packages#10801) 2026-01-16 [email protected] [local_auth_darwin] Migrate XCTest to Swift Testing (flutter/packages#10802) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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.
Part of flutter/flutter#180787
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8692498766458966161/+/u/Run_package_tests/native_test/stdout
Adding CHANGELOG override per #10761 (comment)
Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3