mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Refactoring] Add Codable refactoring action
Inserts the synthesized implementation. As part of this, fix some ASTPrinter bugs. rdar://87904700
This commit is contained in:
15
test/refactoring/AddCodableImplementation/nested.swift
Normal file
15
test/refactoring/AddCodableImplementation/nested.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
// RUN: rm -rf %t.result && mkdir -p %t.result
|
||||
struct Response: Codable {
|
||||
let pages: [Page]
|
||||
|
||||
struct Page: Codable {
|
||||
let results: [Result]
|
||||
|
||||
struct Result: Codable {
|
||||
let title: String
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// RUN: %refactor -add-explicit-codable-implementation -source-filename %s -pos=8:12 > %t.result/codable.swift
|
||||
// RUN: diff -u %S/Outputs/nested/codable.swift.expected %t.result/codable.swift
|
||||
Reference in New Issue
Block a user