mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This adjusts the test diffing to ignore the whitespace changes across different platforms. `raw_fd_ostream` will write out `OF_Text` files with the platform's line endings, which may differ from the source file's.
19 lines
664 B
Plaintext
19 lines
664 B
Plaintext
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/post_fixit_pass.swift.result -o /dev/null -F %S/mock-sdk -swift-version 4
|
|
// RUN: diff --strip-trailing-cr -u %S/post_fixit_pass.swift.expected %t/post_fixit_pass.swift.result
|
|
|
|
#if swift(>=4.2)
|
|
public struct SomeAttribute: RawRepresentable {
|
|
public init(rawValue: Int) { self.rawValue = rawValue }
|
|
public init(_ rawValue: Int) { self.rawValue = rawValue }
|
|
public var rawValue: Int
|
|
public typealias RawValue = Int
|
|
}
|
|
#else
|
|
public typealias SomeAttribute = Int
|
|
#endif
|
|
|
|
func foo(_ d: SomeAttribute) {
|
|
let i: Int = d.rawValue
|
|
}
|
|
|