Skip to content

Commit

Permalink
dont test some tests on tvOS
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Jun 24, 2024
1 parent 549cc59 commit d8b4b40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions Sources/ParseSwift/Protocols/ParseTypeable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ public protocol ParseTypeable: Codable,
// MARK: CustomDebugStringConvertible
extension ParseTypeable {
public var debugDescription: String {
guard let descriptionData = try? ParseCoding.jsonEncoder().encode(self),
let descriptionString = String(data: descriptionData, encoding: .utf8) else {
return "()"
guard let descriptionData = try? ParseCoding.jsonEncoder().encode(self) else {
return "()"

Check warning on line 23 in Sources/ParseSwift/Protocols/ParseTypeable.swift

View check run for this annotation

Codecov / codecov/patch

Sources/ParseSwift/Protocols/ParseTypeable.swift#L23

Added line #L23 was not covered by tests
}

let descriptionString = String(decoding: descriptionData, as: UTF8.self)
return "\(descriptionString)"
}
}
Expand Down
4 changes: 2 additions & 2 deletions Tests/ParseSwiftTests/ParsePushPayloadAnyTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class ParsePushPayloadAnyTests: XCTestCase {
XCTAssertEqual(fcmPayload, decoded2)
let decodedAny2 = try ParseCoding.jsonDecoder().decode(ParsePushPayloadAny.self, from: encoded).convertToApple()
XCTAssertEqual(decodedAny2, applePayload)
#if !os(Linux) && !os(Android) && !os(Windows)
#if !os(Linux) && !os(Android) && !os(Windows) && !os(tvOS)
XCTAssertEqual(fcmPayload.description,
"{\"collapseKey\":\"nope\",\"data\":{\"help\":\"you\"},\"delayWhileIdle\":false,\"dryRun\":false,\"notification\":{\"android_channel_id\":\"you\",\"badge\":\"no\",\"body\":\"android\",\"body_loc-key\":\"cousin\",\"body-loc-args\":[\"mother\"],\"click_action\":\"to\",\"color\":\"blue\",\"icon\":\"world\",\"image\":\"icon\",\"sound\":\"yes\",\"subtitle\":\"trip\",\"tag\":\"it\",\"title\":\"hello\",\"title_loc_args\":[\"arg\"],\"title_loc_key\":\"it\"},\"restrictedPackageName\":\"geez\",\"title\":\"peace\",\"uri\":\"https:\\/\\/parse.org\"}")
#endif
Expand Down Expand Up @@ -228,7 +228,7 @@ class ParsePushPayloadAnyTests: XCTestCase {
XCTAssertEqual(fcmPayload, decoded)
let decoded2 = try ParseCoding.jsonDecoder().decode(ParsePushPayloadAny.self, from: encoded).convertToFirebase()
XCTAssertEqual(decoded2, fcmPayload)
#if !os(Linux) && !os(Android) && !os(Windows)
#if !os(Linux) && !os(Android) && !os(Windows) && !os(tvOS)
XCTAssertEqual(fcmPayload.description,
"{\"collapseKey\":\"nope\",\"contentAvailable\":true,\"data\":{\"help\":\"you\"},\"delayWhileIdle\":false,\"dryRun\":false,\"mutableContent\":true,\"notification\":{\"android_channel_id\":\"you\",\"badge\":\"no\",\"body\":\"android\",\"body_loc-key\":\"cousin\",\"body-loc-args\":[\"mother\"],\"click_action\":\"to\",\"color\":\"blue\",\"icon\":\"world\",\"image\":\"icon\",\"sound\":\"yes\",\"subtitle\":\"trip\",\"tag\":\"it\",\"title\":\"hello\",\"title_loc_args\":[\"arg\"],\"title_loc_key\":\"it\"},\"priority\":\"high\",\"restrictedPackageName\":\"geez\",\"title\":\"peace\",\"uri\":\"https:\\/\\/parse.org\"}")
#endif
Expand Down
2 changes: 1 addition & 1 deletion Tests/ParseSwiftTests/ParsePushPayloadFirebaseTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ParsePushPayloadFirebaseTests: XCTestCase {
let encoded = try ParseCoding.parseEncoder().encode(fcmPayload)
let decoded = try ParseCoding.jsonDecoder().decode(ParsePushPayloadFirebase.self, from: encoded)
XCTAssertEqual(fcmPayload, decoded)
#if !os(Linux) && !os(Android) && !os(Windows)
#if !os(Linux) && !os(Android) && !os(Windows) && !os(tvOS)
XCTAssertEqual(fcmPayload.description,
"{\"collapseKey\":\"nope\",\"contentAvailable\":true,\"data\":{\"help\":\"you\"},\"delayWhileIdle\":false,\"dryRun\":false,\"mutableContent\":true,\"notification\":{\"android_channel_id\":\"you\",\"badge\":\"no\",\"body\":\"android\",\"body_loc-key\":\"cousin\",\"body-loc-args\":[\"mother\"],\"click_action\":\"to\",\"color\":\"blue\",\"icon\":\"world\",\"image\":\"icon\",\"sound\":\"yes\",\"subtitle\":\"trip\",\"tag\":\"it\",\"title\":\"hello\",\"title_loc_args\":[\"arg\"],\"title_loc_key\":\"it\"},\"priority\":\"high\",\"restrictedPackageName\":\"geez\",\"title\":\"peace\",\"uri\":\"https:\\/\\/parse.org\"}")
#endif
Expand Down

0 comments on commit d8b4b40

Please sign in to comment.