File tree Expand file tree Collapse file tree 2 files changed +36
-36
lines changed
Tests/CasePathsMacrosTests Expand file tree Collapse file tree 2 files changed +36
-36
lines changed Original file line number Diff line number Diff line change @@ -425,14 +425,14 @@ final class SelfRewriter: SyntaxRewriter {
425
425
}
426
426
427
427
extension StringProtocol {
428
- @inline ( __always)
429
- func trimmingSuffix( while condition: ( Element ) throws -> Bool ) rethrows -> Self . SubSequence {
430
- var view = self [ ... ]
431
-
432
- while let character = view. last, try condition ( character) {
433
- view = view. dropLast ( )
434
- }
435
-
436
- return view
428
+ @inline ( __always)
429
+ func trimmingSuffix( while condition: ( Element ) throws -> Bool ) rethrows -> Self . SubSequence {
430
+ var view = self [ ... ]
431
+
432
+ while let character = view. last, try condition ( character) {
433
+ view = view. dropLast ( )
437
434
}
435
+
436
+ return view
437
+ }
438
438
}
Original file line number Diff line number Diff line change @@ -721,9 +721,9 @@ final class CasePathableMacroTests: XCTestCase {
721
721
"""
722
722
}
723
723
}
724
-
724
+
725
725
func testDocumentationIndentationTrimming( ) {
726
- assertMacro {
726
+ assertMacro {
727
727
"""
728
728
@CasePathable
729
729
enum Foo {
@@ -732,36 +732,36 @@ final class CasePathableMacroTests: XCTestCase {
732
732
case bar
733
733
}
734
734
"""
735
- } expansion: {
736
- """
737
- enum Foo {
738
- // baz
739
- // case foo
740
- case bar
735
+ } expansion: {
736
+ """
737
+ enum Foo {
738
+ // baz
739
+ // case foo
740
+ case bar
741
741
742
- public struct AllCasePaths {
743
- // baz
744
- // case foo
745
- public var bar: CasePaths.AnyCasePath<Foo, Void> {
746
- CasePaths.AnyCasePath<Foo, Void>(
747
- embed: {
748
- Foo.bar
749
- },
750
- extract: {
751
- guard case .bar = $0 else {
752
- return nil
753
- }
754
- return ()
742
+ public struct AllCasePaths {
743
+ // baz
744
+ // case foo
745
+ public var bar: CasePaths.AnyCasePath<Foo, Void> {
746
+ CasePaths.AnyCasePath<Foo, Void>(
747
+ embed: {
748
+ Foo.bar
749
+ },
750
+ extract: {
751
+ guard case .bar = $0 else {
752
+ return nil
755
753
}
756
- )
757
- }
754
+ return ()
755
+ }
756
+ )
758
757
}
759
- public static var allCasePaths: AllCasePaths { AllCasePaths() }
760
758
}
759
+ public static var allCasePaths: AllCasePaths { AllCasePaths() }
760
+ }
761
761
762
- extension Foo: CasePaths.CasePathable {
763
- }
764
- """
762
+ extension Foo: CasePaths.CasePathable {
765
763
}
764
+ """
765
+ }
766
766
}
767
767
}
You can’t perform that action at this time.
0 commit comments