File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -174,14 +174,21 @@ test_varArgs6()
174174
175175func test_varArgs7( ) {
176176#if canImport(Darwin) && arch(arm64)
177- // Test a workaround for format specifiers and no arguments. We supply eight
178- // words of zeroed memory to give this predictable behavior.
179- my_printf ( " No parameters: %ld %ld %ld %ld %ld %ld %ld %ld \n " )
177+ let canTest = if #available( SwiftStdlib 6 . 2 , * ) { false } else { true }
180178#else
181179 // va_list is more complicated on other targets so that behavior is not the
182- // same, skip the test by doing a fake print of the expected output.
183- my_printf ( " No parameters: 0 0 0 0 0 0 0 0 \n " )
180+ // same, skip the test by doing a fake print of the expected output. Also
181+ // skip the test if we're testing against an older runtime without the fix.
182+ let canTest = false
184183#endif
184+
185+ if canTest {
186+ // Test a workaround for format specifiers and no arguments. We supply eight
187+ // words of zeroed memory to give this predictable behavior.
188+ my_printf ( " No parameters: %ld %ld %ld %ld %ld %ld %ld %ld \n " )
189+ } else {
190+ my_printf ( " No parameters: 0 0 0 0 0 0 0 0 \n " )
191+ }
185192 // CHECK: No parameters: 0 0 0 0 0 0 0 0
186193}
187194test_varArgs7 ( )
You can’t perform that action at this time.
0 commit comments