Skip to content

Commit 9c9a3d7

Browse files
committed
update whitespace test after rebase
1 parent 5fa6152 commit 9c9a3d7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

test/Macros/SwiftifyImport/CountedBy/Whitespace.swift

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
// REQUIRES: swift_swift_parser
2-
3-
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -strict-memory-safety -warnings-as-errors -dump-macro-expansions 2>&1 | %FileCheck --match-full-lines --strict-whitespace %s
4-
51
@_SwiftifyImport(.countedBy(pointer: .return, count: "len"), .lifetimeDependence(dependsOn: .param(1), pointer: .return, type: .copy), .countedBy(pointer: .param(1), count: "len"), .nonescaping(pointer: .param(1)), .countedBy(pointer: .param(3), count: "len2"), .nonescaping(pointer: .param(3)))
62
func myFunc(_ ptr: UnsafeMutablePointer<CInt>?, _ len: CInt, _ ptr2: UnsafeMutablePointer<CInt>?, _ len2: CInt) -> UnsafeMutablePointer<CInt>? {
73
}
84

95
// This test is meant to act as an alarm bell to unintended changes in whitespace
6+
// The swift code is deliberately at the top to avoid the lit directives being glorped
7+
// up as doc comments and included in the macro output.
8+
9+
// REQUIRES: swift_swift_parser
10+
11+
// RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -strict-memory-safety -warnings-as-errors -dump-macro-expansions 2>&1 | %FileCheck --match-full-lines --strict-whitespace %s
1012

1113
// CHECK:------------------------------
14+
// CHECK-NEXT:/// This is an auto-generated wrapper for safer interop
1215
// CHECK-NEXT:@_alwaysEmitIntoClient @lifetime(copy ptr) @lifetime(ptr: copy ptr) @lifetime(ptr2: copy ptr2)
1316
// CHECK-NEXT:func myFunc(_ ptr: inout MutableSpan<CInt>?, _ ptr2: inout MutableSpan<CInt>?) -> MutableSpan<CInt>? {
1417
// CHECK-NEXT: let `len` = CInt(exactly: ptr?.count ?? 0)!
@@ -45,4 +48,5 @@ func myFunc(_ ptr: UnsafeMutablePointer<CInt>?, _ len: CInt, _ ptr2: UnsafeMutab
4548
// CHECK-NEXT: return unsafe MutableSpan<CInt>(_unsafeStart: _resultValue!, count: Int(len))
4649
// CHECK-NEXT: }
4750
// CHECK-NEXT: }()
48-
// CHECK-NEXT:}
51+
// CHECK-NEXT:}
52+
// CHECK-NEXT:------------------------------

0 commit comments

Comments
 (0)