Commit f709ea1
authored
[url_launcher_ios] Migrate XCTest to Swift Testing (#10780)
Part of flutter/flutter#180787
Add some test parameterization.
```
◇ Test run started.
↳ Testing Library Version: 102 (arm64-apple-ios13.0-simulator)
◇ Suite URLLauncherTests started.
◇ Test canLaunchFailureWithInvalidURL() started.
◇ Test canLaunch(url:expected:) started.
◇ Test launchWithUniversalLinks() started.
◇ Test launch(url:expected:) started.
◇ Test launchSafariViewControllerWithClose() started.
◇ Test launchSafariViewControllerFailureWithNoViewPresenter() started.
◇ Test launchWithoutUniversalLinks() started.
◇ Test launchFailureWithInvalidURL() started.
◇ Passing 2 arguments url → "good://url", expected → .success to launch(url:expected:)
◇ Passing 2 arguments url → "bad://url", expected → .failure to launch(url:expected:)
2026-01-12 12:53:39.222409-0800 Runner[62355:494810] [Warning] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<SFSafariViewController: 0x1018cd200>)
◇ Passing 2 arguments url → "bad://url", expected → .failure to canLaunch(url:expected:)
◇ Passing 2 arguments url → "good://url", expected → .success to canLaunch(url:expected:)
✔ Test canLaunchFailureWithInvalidURL() passed after 0.001 seconds.
✔ Test launchWithUniversalLinks() passed after 0.001 seconds.
✔ Test launchSafariViewControllerWithClose() passed after 0.042 seconds.
✔ Test launchWithoutUniversalLinks() passed after 0.042 seconds.
✔ Test launchSafariViewControllerFailureWithNoViewPresenter() passed after 0.042 seconds.
✔ Test launchFailureWithInvalidURL() passed after 0.042 seconds.
✔ Test launch(url:expected:) passed after 0.043 seconds.
✔ Test canLaunch(url:expected:) passed after 0.043 seconds.
✔ Suite URLLauncherTests passed after 0.043 seconds.
✔ Test run with 8 tests passed after 0.043 seconds.
```
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8692848274232556065/+/u/Run_package_tests/native_test/stdout
Adding CHANGELOG override per #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.1 parent 6350518 commit f709ea1
File tree
2 files changed
+89
-104
lines changed- packages/url_launcher/url_launcher_ios/example/ios
- Runner.xcodeproj
- RunnerTests
2 files changed
+89
-104
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
| 653 | + | |
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
| 674 | + | |
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
| |||
Lines changed: 87 additions & 102 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
47 | 52 | | |
48 | 53 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | | - | |
| 57 | + | |
59 | 58 | | |
60 | | - | |
| 59 | + | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
87 | 77 | | |
88 | | - | |
89 | 78 | | |
90 | | - | |
91 | | - | |
92 | 79 | | |
93 | 80 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
103 | 93 | | |
104 | | - | |
105 | | - | |
| 94 | + | |
106 | 95 | | |
107 | | - | |
108 | 96 | | |
109 | | - | |
110 | | - | |
111 | 97 | | |
112 | 98 | | |
113 | | - | |
| 99 | + | |
114 | 100 | | |
115 | 101 | | |
116 | 102 | | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
124 | 112 | | |
125 | | - | |
126 | 113 | | |
127 | | - | |
128 | | - | |
129 | | - | |
| 114 | + | |
| 115 | + | |
130 | 116 | | |
131 | 117 | | |
132 | | - | |
| 118 | + | |
133 | 119 | | |
134 | 120 | | |
135 | 121 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
143 | 131 | | |
144 | | - | |
145 | 132 | | |
146 | | - | |
147 | | - | |
148 | | - | |
| 133 | + | |
| 134 | + | |
149 | 135 | | |
150 | 136 | | |
151 | | - | |
| 137 | + | |
152 | 138 | | |
153 | 139 | | |
154 | 140 | | |
155 | 141 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
163 | 151 | | |
164 | | - | |
| 152 | + | |
165 | 153 | | |
166 | | - | |
167 | | - | |
168 | | - | |
| 154 | + | |
169 | 155 | | |
170 | 156 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
180 | 168 | | |
181 | | - | |
182 | 169 | | |
183 | | - | |
184 | | - | |
185 | 170 | | |
186 | 171 | | |
187 | 172 | | |
| |||
0 commit comments