Skip to content

Commit

Permalink
Fix macros (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
christiancabarrocas authored Oct 24, 2024
1 parent b7fa48b commit 065f4eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ struct DecodeVariableBuild {
}

func buildStringOrInt(attribute: AttributeSyntax) -> CodeBlockItemSyntaxBuilder {
guard type == "String" else {
guard type == "String?" else {
return buildBasicDecode()
}

Expand Down Expand Up @@ -221,7 +221,7 @@ struct DecodeVariableBuild {
}

func buildStringOrDouble(attribute: AttributeSyntax) -> CodeBlockItemSyntaxBuilder {
guard type == "String" else {
guard type == "String?" else {
return buildBasicDecode()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ final class CustomDecodableTests: XCTestCase {
@CustomCodable
struct PlayingObject {
@StringOrInt
var value: String
var value: String?
}
""",
expandedSource: """
struct PlayingObject {
var value: String
var value: String?
enum CodingKeys: String, CodingKey {
case value
Expand Down Expand Up @@ -180,12 +180,12 @@ final class CustomDecodableTests: XCTestCase {
@CustomCodable
struct PlayingObject {
@StringOrDouble
var value: String
var value: String?
}
""",
expandedSource: """
struct PlayingObject {
var value: String
var value: String?
enum CodingKeys: String, CodingKey {
case value
Expand Down

0 comments on commit 065f4eb

Please sign in to comment.